TerInsertDateTime
Insert a date/time field.
boolean TerInsertDateTime( format, repaint)
String format; | Date time format (see description). Set this parameter to null to display a date format selection dialog box. |
boolean repaint; | Repaint the window after this operation |
Description: The format argument accepts a format string. A format String consists of day, date, month, year, second, hour and delimiter components. Example:
TerInsertDateTime( "M/d/yy" ,true);
TerInsertDateTime( "M-d-yy " ,true);
TerInsertDateTime( "d/M/yy" ,true);
Following is a list of various format components using an example date: June 8, 1999, 2:30:01 PM
Format
String Component Example
--------- ------------------------------ -----------
D day 8
M month 6
dd day, 0 padded 08
MM month, 0 padded 06
yy year, 2 digits 99
yyyy year, 4 digits 1999
ddd day (abbr) Tue
MMM month (abbr) Jun
dddd day Tuesday
MMMM month June
HH hour, 24 hour format 14
mm minutes 30
ss seconds 01
h 12 hour format 2
hh 12 hour format, 0 padded 02
am/pm AM or PM am/pm
Example date format strings:
"d MMM yy" 8 June 99
"dd/MM/yyyy " 08/06/1999
"dddd, d MMMM yyyy" Tuesday, 8 June 1999
" h:mm" 2:30
"HH:mm" 14:30
"hh:mm:ss am/pm" 02:30:01 PM
"dddd, d MMMM yyyy hh:mm:ss am/pm" Tuesday, 8 June 1999 02:30:01 PM
Note: Date format is case-sensitive.
Delimiter: A delimiter may be used to separate the date components. The delimiter could be '/', '-', comma, spaces or any character not used by the date components.
Return Value: This function returns true when successful.