I need to separate a date/time field held in my database into a date field and a time field. I want to do this so I can query the number of records by date. I’ve looked at the various options mentioned on the forum, including the LEN, DateValue, Format functions etc but with no success so far unfortunately!
This is the SQL for the query so far (the field I want to split is DFDateRaised):
This is the format of the date and time field: 08/05/2009 09:46:00
If anyone can help I would be most grateful!!
Cheers
swifty
This is the SQL for the query so far (the field I want to split is DFDateRaised):
Code:
SELECT SectionData.RouteNumber, DefectData.CompClassTag, DefectData.DFDateRaised, DefectData.RoomDirnTitle, DefectTypes.NewCategory
FROM ((SectionData INNER JOIN DefectData ON SectionData.SectionLabelRMMS = DefectData.[Section Ref]) INNER JOIN DefectTypes ON DefectData.DPCode = DefectTypes.ExistingCategory) LEFT JOIN Months ON DefectData.DFDateRaised = Months.DefectDate
WHERE (((DefectData.DPCode)<>"As New" And (DefectData.DPCode)<>"Cyclic" And (DefectData.DPCode)<>"None" And (DefectData.DPCode)<>"Satis" And (DefectData.DPCode)<>"Unspec" And (DefectData.DPCode)<>"New"))
ORDER BY DefectData.[Section Ref];
This is the format of the date and time field: 08/05/2009 09:46:00
If anyone can help I would be most grateful!!
Cheers
swifty