Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    159

    Unanswered: confused on format results

    I am confused as to the result I get in a query.
    If I have an expression that I run format in such as
    Format([tbl]![myDATE],"mmddyy")) Doing this to standardise the output.
    I would expect to get the month/day/year as two digit numbers but I don't in fact I get something totally different.
    putting in 012495 (Jan 24 1995) as mydate gives me 031734
    What is happening?

  2. #2
    Join Date
    Apr 2004
    Posts
    173
    my guess is that access sees 012495 as a serial date value rather than say 01/24/95. If you could put it in as a serial value I think it would work out.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I agree with mmbosman. When dealing with date conversions, integers are implicitly interpreted as serial values. You may have to manually parse the date as such:

    Left$(myDate, 2) & "/" & Mid$(myDate, 3, 2) & "/" & Right$(myDate, 2)
    Last edited by Teddy; 08-03-04 at 14:42.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    May 2004
    Posts
    159
    Thanks for helping me understand why this was happening!

Posting Permissions

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