I have a table (IncdSummary) with a poorly formed date field ([DISPTIME]which has a date plus junk). The following query gets me the date I need:
SELECT Trim(Left([DISPTIME],InStr([DISPTIME]," "))) AS [Date], CDate([Date]) AS MyDate, DatePart("m",[Mydate]) AS DM, DatePart("yyyy",[Mydate]) AS DY, DatePart("d",[Mydate]) AS DD, [DY] & Format([dm],"00") & Format([dd],"00") AS DateNumeric
FROM IncdSummary;
This takes a value of 7/6/2010 00:12:15pm and returns 20100706 as a numneric value as needed.
Can I use this in a module to add a numeric field to IncdSummary table. I have no idea how to create of format a module.