Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A mid function and a format (access 2000)

    What is wrong with this - TransactionDate: format([Mid$([FullLineField],25,6)], yy/mm/dd)
    I get an error
    or how can I change a text to date
    show me some examples

  2. #2
    Star Lounger
    Join Date
    Oct 2001
    Location
    Western Massachusetts, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: A mid function and a format (access 2000)

    Not that I would want to move the dd to the end of the format, but try the " " around the yy/mm/dd. See if that does it.
    Paul
    TransactionDate: format([Mid$([FullLineField],25,6)], "yy/mm/dd")

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: A mid function and a format (access 2000)

    Try this:

    format([Mid$([FullLineField],25,6), "yy/mm/dd")

    You had an extra ] in there, and you need quotes around the date format.
    Charlotte

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: A mid function and a format (access 2000)

    I would tend to use the cdate() function rather than the format() function (although the format function does work)

    Just as an alternative really I guess

    cdate(Mid$([FullLineField],25,6))

    Cheers

    Jayden

Posting Permissions

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