W
WDSnews
First I'd like hearing your opinion for a strategy for handling the time
data type. I want the ability to calculate and compare time. The database
contains text fields for start time and end time and now I think I want to
convert them to a date/time field?
Before I convert the fields from text to data/time, there is a bit of
normalizing to do and my test query is giving an error. The query seems to
work for a moment, showing the data I expect for a second or two Then the
data disappear and Access returns an error ...
"Data type mismatch in criteria expression".
I'm typing <#6:00AM# for the criteria, but you can see what Access uses for
a SQL statement.
SELECT [Classes Proposed].ID, [Classes Proposed].[Course No], [Classes
Proposed].[Course Title], Format([Start Time],"h:nn am/pm") AS StartTime,
Format([Classes Proposed].[End Time],"h:nn am/pm") AS EndTime,
CDate([Classes Proposed].[End Time]) AS convdate
FROM [Classes Proposed]
WHERE (((CDate([Classes Proposed].[End Time]))<#12/30/1899 6:0:0#));
What is the correct way to find text fields that contain a tiime before 6:00
AM?
data type. I want the ability to calculate and compare time. The database
contains text fields for start time and end time and now I think I want to
convert them to a date/time field?
Before I convert the fields from text to data/time, there is a bit of
normalizing to do and my test query is giving an error. The query seems to
work for a moment, showing the data I expect for a second or two Then the
data disappear and Access returns an error ...
"Data type mismatch in criteria expression".
I'm typing <#6:00AM# for the criteria, but you can see what Access uses for
a SQL statement.
SELECT [Classes Proposed].ID, [Classes Proposed].[Course No], [Classes
Proposed].[Course Title], Format([Start Time],"h:nn am/pm") AS StartTime,
Format([Classes Proposed].[End Time],"h:nn am/pm") AS EndTime,
CDate([Classes Proposed].[End Time]) AS convdate
FROM [Classes Proposed]
WHERE (((CDate([Classes Proposed].[End Time]))<#12/30/1899 6:0:0#));
What is the correct way to find text fields that contain a tiime before 6:00
AM?