Skip to content

Sysdate4

Obsolete

This command is replaced by the CurrentDateTime function.

See Also

Purpose

To return the current system date, hour, minute, and second.

Syntax

sysdate4 {date} [{hour} [{minute} [{second}]]]
  • {minute} is allowed only if {hour} is used.
  • {second} is allowed only if {minute} is used.

What It Does

Sysdate4 retrieves the date and time from the operating system and moves the date to date. If an additional variable is provided, the hour is moved to that variable (hour). If two additional variables are provided, the minute is moved to the second additional variable (minute). If three additional variables are provided, the second is moved to the third additional variable (second).

Sysdate4 moves the date (with the year in four digits) to date as a Julian integer, which can be interpreted correctly by date-type variables. The hour is moved to hour in 24-hour format. date can be accommodated in variables of length ten, while hour, minute, and second can be accommodated in variables of length two each.

Example

date dToday
integer iHr iMin iSec
sysdate4 dToday iHr iMin iSec

In this example, if it is 1:36:18 PM on January 1, 2002, DataFlex moves 01/01/2002 to dToday, 13 to iHr, 36 to iMin, and 18 to iSec.

Notes

  • The sysdate command returns the date with the year in two digits.
  • The predefined variable Strlen is set to the value of hour and the predefined variable strmark is set to the value of minute.