Results 1 to 4 of 4
  1. #1
    stalk is offline Competent Performer
    Windows 8 Access 2003
    Join Date
    May 2014
    Posts
    143

    Extract date from a string

    How can I extract date from a short text(length 27) Temp= 2020-01-22 00:00:00.000000 to Dt_Tested=1/22/2020



    I have to update all the records in my table.

    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Maybe:

    CDate(Left(string, 10))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    get date:
    =mid([field],6,2) & "/" & mid([field],9,2) & "/" & left([field],4)

  4. #4
    stalk is offline Competent Performer
    Windows 8 Access 2003
    Join Date
    May 2014
    Posts
    143
    It worked. Thank you

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

Similar Threads

  1. Replies: 11
    Last Post: 08-19-2016, 01:43 PM
  2. Extract data from string
    By johnny51981 in forum Queries
    Replies: 20
    Last Post: 06-22-2015, 02:44 PM
  3. Extract number from String
    By DOSRoss in forum Programming
    Replies: 26
    Last Post: 04-28-2015, 06:07 AM
  4. Extract string before and after a period
    By bchi99 in forum Queries
    Replies: 3
    Last Post: 11-03-2014, 04:08 PM
  5. Extract Value from Variable in String
    By nguyenak in forum Programming
    Replies: 3
    Last Post: 05-24-2012, 03:50 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