Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jul 2006
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Dates (2003)

    Hi Guys, I have some date data as text in format "yyyymm". I want to put the "dd" in as "01" across the board, and return a format of "ddmmyy". I'm using a query grid. Can anyone show me a more elegant way of doing this than chunking up numbers and adding them together again???

    Many thanks.

    Ina

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Dates (2003)

    I don't think there is a really elegant way to do this. If it is a text field, you can use an update query to change the values. Set the 'Update to' value to

    "01" & Right([Fieldname],2) & Mid([Fieldname],3,2)

    where Fieldname is the name of the text field. If it is actually a date/time field, or if you want to create a date/time field, it would be different.

  3. #3
    Star Lounger
    Join Date
    Jul 2006
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Dates (2003)

    Just the job. Thanks Hans

Posting Permissions

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