Results 1 to 3 of 3
  1. #1
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64

    Converting imported string dates to Date/Time

    Hello!
    I am importing a large amount of data from an HTML document into a table. There is a text field with dates in it and the format of the dates is
    Code:
    June 8 12:48:10 2010 EDT
    How do i convert this to Date/Time? I have tried a lot of different ways in an update queries with no luck. Any help would be greatly apreciated.


    Thank you

  2. #2
    dsmacs is offline Advanced Beginner
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2009
    Location
    Perth Western Australia
    Posts
    52
    Try this formula in a query;-

    FormatDateTime(Left([ConvDate],InStr([ConvDate],":")-4) & "," & Mid([ConvDate],InStr([ConvDate],":")+6,5) & " " & Mid([ConvDate],InStr([ConvDate],":")-2,8),0)

    where convDate is the name of the field

    Cheers
    Darren

  3. #3
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64
    Quote Originally Posted by dsmacs View Post
    Try this formula in a query;-

    FormatDateTime(Left([ConvDate],InStr([ConvDate],":")-4) & "," & Mid([ConvDate],InStr([ConvDate],":")+6,5) & " " & Mid([ConvDate],InStr([ConvDate],":")-2,8),0)

    where convDate is the name of the field

    Cheers
    Darren
    Works great, thank you so much...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Split string into Date and Time Columns?
    By Hobbes29 in forum Queries
    Replies: 2
    Last Post: 06-08-2010, 06:50 PM
  2. Help with date stored as string
    By weisslakeguy in forum Queries
    Replies: 8
    Last Post: 05-26-2010, 11:14 AM
  3. Replies: 4
    Last Post: 01-30-2010, 05:22 PM
  4. Converting/Viewing OLE Data as String...
    By oldgem in forum Access
    Replies: 0
    Last Post: 09-12-2009, 06:35 PM
  5. Convert string to date
    By ~SwAmPdOnKeY~ in forum Queries
    Replies: 4
    Last Post: 09-11-2008, 07:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums