Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: separate date with time

    Hi: Date in my table is in that format. How to i separate date with time.

    11/9/2006 10:10:46 AM

    Thank You.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    look at the various format() options

    store the information as date/time values
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    What do you mean? You want separate columns for the date and time?
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    You're probably using Now() which gives you 11/9/2006 10:10:46 AM
    Replace it with Date() for 11/9/2006 or Time() for 10:10:46 AM or follow healdem's advice if you need something fancier.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by Missinglinq
    You're probably using Now() which gives you 11/9/2006 10:10:46 AM
    Replace it with Date() for 11/9/2006 or Time() for 10:10:46 AM or follow healdem's advice if you need something fancier.

    sorry what I should have said is its always a godd idea to store the infromation in the db's native data type for date/time values and use formatting in reports & forms to change that to what ever format the user wants. heck there even some deluded people who think MM/DD/YYYY is an appropriate way of displaying dates.

    If you just want a date then Missinglinq's comment is more appropriate... its will save you headaches when you start to search on dates and wonder why you dont get all the rows you expected. If you sepcify a where criteria which excludes a time value you will cut off all records that occured after 00:00 (the start of the day)... something the bean counters get very upset about, cant think why
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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