Changing format for a new field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create reports in database where the table has 3 fields Day, Month, Year which have been created as number data types. I can concantenate them in a query so that they look like dd\mm\yyyy format but cannot get the field to act like a date. I belevee I need to format the new field as a short date but can't find out how to do this. Can anyone help please?
 
If you use the DateSerial() function to combine them, I believe you get a
date. Another approach might be to give the CDate() function a try.
 
You may not realize it, but you ARE!

Create a new query. Select the table that has your three-field dates in it.
In a field "cell" on the grid, enter

DateSerial([YourYearField],[YourMonthField],[YourDayField])

where you use the names of your year, month and day fields (and please tell
me they aren't named "Year", "Month" and "Day" -- these are reserved words
in Access).

Select any other fields you wish to have displayed, and run the query.

This should give you a "date"-type field.
 
Back
Top