Results 1 to 4 of 4
  1. #1
    Newby is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Posts
    60

    How a date from a text "20141031"

    I am able to create year, Month, and day by using Val(left([],4)) , mid and right.



    When I try to put it back together using Date(Yr,Mon,day) does not work. This should be simple.

    Thanks in advance

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    In Access, the function to use is DateSerial, i.e.
    DateSerial(Yr,Mon,day)

    See: https://support.office.com/en-US/Art...a-93f2b046f503

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    year(date) & month(date) & day(date)

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    ranman, the value is text, not a valid date, so Year(), Month(), Day() won't work.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  2. Replies: 2
    Last Post: 11-26-2012, 11:12 PM
  3. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  4. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  5. Replies: 4
    Last Post: 03-14-2012, 09:05 AM

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