This command prompts the user to choose a date and/or time from a calendar/clock screen and then returns the selected date/time as a formatted string.
Syntax
DATE_PICK type, "date_format", time_format
The type parameter determines whether the user will be prompted to specify a date, a time, or both. It also determines whether this command will return a date, a time, or both.
Valid options for this parameter are:
type |
explanation |
0 |
date and time |
1 |
date only |
2 |
time only |
The date_format parameter determines the format of the date/time that this command will return.
If you specified a type parameter of 1 (date only) or 2 (time only), this command will return only that portion of the date/time format specified by the date_format parameter.
Valid options for the date_format parameter are:
return value is formatted according to: |
|
"" |
short date and time format in the workstation's regional options |
16-character string format (YYYYMMDDHHmmsshh) used to store date/time stamps in GainSeeker tables |
The default date may be passed in by appending it to the "date_format" value. Examples are "<2012/9/19 12:34>" or "HSI<2012/9/19 12:34>". The date must include the time and must be within the brackets. If you do not need the time, just set it to a specific value, for example, 12:00.
The time_format parameter determines the smallest amount of time that will be available for the user to select. It also determines the amount of information returned by this command.
Valid options for this parameter are:
time_format |
user may specify: |
0 |
hours and minutes |
1 |
hours, minutes and seconds |
2 |
hours, minutes, seconds, and hundredths of seconds |
-1 |
use the configuration setting for timestamp precision |
Return value
If the user clicks OK, this command returns a string containing the specified date and/or time.
If the user clicks Cancel, this command returns an empty string.
Notes
When the user is prompted to specify a date, they may click the button to select the date from a calendar screen:
Examples
If the user enters the date/time shown below and then clicks OK, these formulas return the following strings:
DATE_PICK 0
Formula |
when regional options are set to English (United States): |
when regional options are set to Italian (Italy): |
||
User prompt |
Return string |
User prompt |
Return string |
|
DATE_PICK 0, "", 0 |
8/9/2007 17:12 |
09/08/2007 17.12 |
||
DATE_PICK 0, "HSI", 0 |
200708091712 |
200708091712 |
||
DATE_PICK 0, "", 2 |
|
|
||
|
2007080917122766 |
2007080917122766 |
DATE_PICK 1
Formula |
|
when regional options are set to Italian (Italy): |
||
User prompt |
Return string |
User prompt |
Return string |
|
DATE_PICK 1, "", 0 |
8/9/2007 |
09/08/2007 |
||
|
20070809 |
20070809 |
DATE_PICK 2
Formula |
|
when regional options are set to Italian (Italy): |
||
User prompt |
Return string |
User prompt |
Return string |
|
DATE_PICK 2, "", 1 |
17:12:27 |
17.12.27 |
||
|
171227 |
171227 |