Results 1 to 3 of 3

Thread: [RESOLVED] [Access Queries] Extracting part of a string

  1. #1

    Thread Starter
    Hyperactive Member Quasar6's Avatar
    Join Date
    Mar 2008
    Location
    Sol 3
    Posts
    325

    Resolved [RESOLVED] [Access Queries] Extracting part of a string

    I'm messing around with a database here which stores timestamps as strings, with the users initials followed by a date and a time. Heres an example:

    "JS 07-Oct-08 4:54:13 PM"

    It's a stupid setup, I know, but I'd like to set up a query which displays the second part of the string, from 07-Oct- onwards. It can then be used in graphs in excel.

    So my question is: how can I do this?

    Thanks!
    Qu
    "Why do all my attempts at science end with me getting punched by batman?" xkcd.

    |Pong||
    Sorry for not posting more often.

  2. #2
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: [Access Queries] Extracting part of a string

    SELECT CDate(Mid([timestamps], 4)) As Dt FROM ...
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  3. #3

    Thread Starter
    Hyperactive Member Quasar6's Avatar
    Join Date
    Mar 2008
    Location
    Sol 3
    Posts
    325

    Re: [Access Queries] Extracting part of a string

    Thanks Anhn. Problem solved.
    "Why do all my attempts at science end with me getting punched by batman?" xkcd.

    |Pong||
    Sorry for not posting more often.

Posting Permissions

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



Click Here to Expand Forum to Full Width