Results 1 to 5 of 5
  1. #1
    scorpion99 is offline Novice
    Windows 7 32bit Access 2002
    Join Date
    Nov 2013
    Posts
    27

    Get only date from a datetime in access

    Hello all,



    In access query ,I only need to get the date 31/12/2012 for example from the following :

    31/12/2012 9:18:35 AM which is datetime value.
    How can this be done please?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try the DateValue() or Format() functions.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You are showing date as dd/mm/yyyy. Access expects mm/dd/yyyy. Review http://allenbrowne.com/ser-36.html
    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.

  4. #4
    scorpion99 is offline Novice
    Windows 7 32bit Access 2002
    Join Date
    Nov 2013
    Posts
    27
    Actually i am trying to create the query in access which is linked to an SQL server , maybe that's why the date have the following format.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you try either of the functions I suggested?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 0
    Last Post: 10-11-2013, 06:07 AM
  2. Dateserial and datetime
    By webisti in forum Access
    Replies: 1
    Last Post: 06-17-2013, 11:31 AM
  3. How to build a datetime column ....
    By kkrishna in forum Access
    Replies: 3
    Last Post: 01-27-2011, 10:43 AM
  4. Replies: 1
    Last Post: 03-04-2009, 10:13 PM
  5. HELP with NULL DateTime VALUES
    By lfolger in forum Programming
    Replies: 3
    Last Post: 03-28-2008, 02:33 PM

Tags for this Thread

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