Results 1 to 4 of 4

Thread: DateTime to String?

  1. #1
    Senior Member
    Join Date
    Jan 2006
    Location
    Oop North
    Posts
    1,403
    Thanks
    2
    Thanked
    4 times in 4 posts

    DateTime to String?

    Hey,

    Is there a way to get a field out of an access database which is in DateTime format to be displayed on screen as a string? I'm using Borland C++. I've tried this but it doesnt work:

    Code:
    this->SearchLoanStartEdit->Text = searchQuery->FieldByName("rented")->AsString;
    With this code, I get a data mismatch error.

    Thanks

  2. #2
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable
    you might have to throw a type cast, depends on what type AsString is and if Text is of the same type.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  3. #3
    Senior Member skuzgib's Avatar
    Join Date
    Oct 2004
    Location
    Bromsgrove, Worcestershire / Durham
    Posts
    1,917
    Thanks
    6
    Thanked
    1 time in 1 post
    It's really easy to convert stuff if you use the .net convert class, might be worth looking it up.

  4. #4
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    not inside borland it won't be
    throw new ArgumentException (String, String, Exception)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VB String Manipulation
    By PHTC in forum Software
    Replies: 12
    Last Post: 01-02-2006, 06:51 PM
  2. SQL Server Connection string?
    By Stoo in forum Software
    Replies: 7
    Last Post: 04-05-2005, 05:48 PM
  3. Just got my first 12 string
    By Alex in forum Consumer Electronics
    Replies: 8
    Last Post: 10-07-2004, 01:00 PM
  4. Zakky - Thanks for the string dude :)
    By Tumble in forum General Discussion
    Replies: 3
    Last Post: 03-06-2004, 03:01 PM
  5. String and rope......
    By Zak33 in forum General Discussion
    Replies: 17
    Last Post: 31-01-2004, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •