Build an SQL time value from specified time and AM/PM designation
Syntax
ns_buildsqltimetime ampm
Description
ns_buildsqltime returns an SQL time value out of the specified time and am/pm designation. The time must be the clock time from 1:00 to 12:59, not military time. The time may optionally include seconds (e.g., 1:00:00 to 12:59:59). The am/pm designation must be the text "AM" or "PM". An error is returned if any of the argument values are invalid.
The resulting SQL time value can be used in an SQL statement.
Example
set thetime [ns_buildsqltime "2:57" "AM"]
ns_db select $db \
"select taskname from projects where startime = '$thetime'"