DATE_PICK

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

type

explanation

0

date and time

1

date only

2

time only

"date_format"

return value is formatted according to:

""

short date and time format in the workstation's regional options

"HSI"

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.

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

8/9/2007 17:12:27.66

09/08/2007 17.12.27,66

DATE_PICK 0, "HSI", 2

2007080917122766

2007080917122766

DATE_PICK 1

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 1, "", 0

8/9/2007

09/08/2007

DATE_PICK 1, "HSI", 0

20070809

20070809

DATE_PICK 2

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 2, "", 1

17:12:27

17.12.27

DATE_PICK 2, "HSI", 1

171227

171227