Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Convert Text Date to Date format (A2k)

    Hi all

    The following query gets it's data from a txt doc and creates an access table with the data.
    The DateBO field is text in the underlying table but needs to be Date format in the new table.
    Within the query, th etext DateBO is Date/Time so have stripped out the ten left characters.

    SELECT [Parts-Orders].EstNo, [Parts-Orders].Part, [Parts-Orders].Enq, Left([DateTimeO],10) AS DateBO INTO tblBackOrder
    FROM [Parts-Orders]
    WHERE ((([Parts-Orders].Enq)="BACK ORDER"))
    ORDER BY Left([DateTimeO],10) DESC;

    I'd appreciate any help.

    Regards

    DAve

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

    Re: Convert Text Date to Date format (A2k)

    Hi Dave,

    Try

    ..., DateValue(Left([DateTimeO],10)) AS DateBO ...

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Convert Text Date to Date format (A2k)

    Thanks Hans, thats very accurate and helpful as ever.

    Very best of regards.

Posting Permissions

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