Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2009
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi folks, scratching my head about how to write a query to update date data presented to me as text like this:


    Mar 4, 2010 3:34:36 PM GMT
    Dec 18, 2009 10:46:20 AM GMT

    Into something like 04/03/2010?

    Can anyone help? Much obliged.

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As long as the format of the text is as you've shown - 3 character month followed by the day a comma and 4 digit month, you can use the following formula.

    CDate(Trim(Left([dateText],12)))

    or if you want to maintain the time as well.

    CDate(Trim(Left([datetext],Len([datetext])-3)))

    Then format as Short Date if you only want to display the Date.

  3. #3
    Lounger
    Join Date
    Oct 2009
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Much obliged - will give it a try

Posting Permissions

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