Results 1 to 2 of 2

Thread: Writing to DateTime type in Access!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    London
    Posts
    290
    How?!
    I can write date, or time, but not both. I`ve not tried reading yet.

    Doesnt appear to be any help online, or on the net.

    I`ve tried formatting a string containing both time and date but still i cant do it!

    Any ideas?

    Thanks,
    Alex.

  2. #2
    Member
    Join Date
    Jan 2000
    Location
    Quantico, VA, USA
    Posts
    41

    Cool

    So, you're want to combine a date and time to get one value that you can write into an access database? There are several ways:

    Change both into strings and use the & and a space:

    cdate(cstr(dDate) & " " & cstr(dTime))

    or you could:

    dFinal = dDate + dTime

    because the dDate is whole numbers and the time is on the right side of the decimal (ie. fractional).

    Basically, combine the two before putting them into the database.

    Is that what you're asking?
    chuck
    To err is human, but to apologize frequently is embarassing.

Posting Permissions

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



Click Here to Expand Forum to Full Width