|
<< Click to Display Table of Contents >> Time formats |
![]() ![]()
|
Local SQL expects time literals to be in the format hh:mm:ss AM/PM; where hh are the hours, mm the minutes, and ss the seconds. When inserting new data with a time value, the AM/PM designator is optional and is case-insensitive ("AM" is the same as "am"). The time literal must be enclosed in quotation marks.
INSERT INTO WorkOrder
(ID, StartTime)
VALUES ("B00120","10:30:00 PM")
Indicate which half of the day (morning or after noon) a time literal falls under in one of two ways. If an AM or PM marker is specified, that determines the half of the day. If no AM/PM designator is specified, the hour field is compared to 12. If the hour is less than twelve, the time is in the AM; if greater than 12, after noon. The hour field overrides an AM/PM designator. For example, the time literal "15:03:22 AM" is translated as "3:03:22 PM". For example, the statement below only retrieves rows where the Event_Time column contains a value of "1:00:00 PM" and excludes those of "1:00:00 AM".
SELECT *
FROM "Events.db"
WHERE (Event_Time = "13:00:00")