The following table offers examples of the various date and time functions:
Procedure Result dt_systime2026-02-02 10:11:17 dt_systime -gmt t2026-02-02 09:11:17 dt_systime -format "%Y-%m-%d %H:%M:%S %Z"2026-02-02 10:11:17 CET dt_sysdate2026-02-02 dt_sysdate -format "%b %d, %Y"Feb 02, 2026 dt_sysdate -format "%b %e, %Y"Feb 2, 2026 dt_ansi_to_pretty02/02/26 dt_ansi_to_list2026 2 2 10 11 17 dt_julian_to_ansi 24519152001-01-05 dt_month_names{January} {February} {March} {April} {May} {June} {July} {August} {September} {October} {November} {December} dt_month_abbrev{Jan} {Feb} {Mar} {Apr} {May} {Jun} {Jul} {Aug} {Sep} {Oct} {Nov} {Dec} dt_valid_time_p "bad date"0 dt_valid_time_p "2001-01-05"1 dt_valid_time_p "2001-01-05 12:00 pm"1 dt_interval_check "2001-01-01" "2001-02-01"2678400 dt_interval_check "2001-02-01" "2001-02-01"0 dt_interval_check "2001-02-01" "2001-01-01"-2678400
Notes
- Any timezone-specific information will be based on the host configuration where the server is running.
- Without a supplied date or time argument, all procedures return results based on the current server time.
- The format argument used by
dt_sysdateanddt_systimeaccepts any of the formatting codes supported by the Tclclock formatprocedure, which is used for the underlying processing. See current documentation at http:///www.tcl.tk/man/. - All procedures that take date or time as an input argument are capable of
accepting these inputs in any format capable of being parsed by
clock scan. This includes virtually all ordinary date and time formats, including am/pm and timezone qualifiers.