Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004

    Unanswered: "Converting Numbers into Dates"

    I'm working in Access 2000. I was given some tables with number (long integer) data types for dates, such as 20041011 for Oct. 11, 2004. How can I convert these rows of numbers into dates? in order to re-format the table to accept them as dates?

    I prefer to do this within the sql statement (update query, etc). What is the sql syntax to do this? (assume the column name is Notdate). Thanks!!!

  2. #2
    Join Date
    Sep 2004
    Reston, VA
    Add a column to your table that is a Date/Time data type. Then use this update query:

    UPDATE table_name SET table_name.new_date_field = CDate(Mid([Notdate],5,2) & "/" & Right([Notdate],2) & "/" & Left([Notdate],4));

    Where new_date_field is the name of your new date/time field.

Posting Permissions

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