DTime Function
DTime returns an integer that represents date and time
DTime - Calculating with times
With the functions with DTime and DTimef can be used to calculate times or time differences in RedCrab
The function DTime returns an integer representing a given time. The time is passed as an argument in a list in the following format [year, month, day, hour, minute, second].
As a interger number, the times can be added or subtracted. The calculated sum is then converted back into a date and time format with DTimef .
Determine current time
Calling DTime with the argument 0 returns the value for the current date and time
Parameters in RedCrab
The argument is a data field whose 6 cells contain the values in the order given above
Valid values of the arguments
- 1 <= year <= 9999
- 1 <= month <= 12
- 1 <= day <= 28 | 29 | 30 | 31 depending on the month
- 0 <= hour <= 23
- 0 <= minute <= 59
- 0 <= second <= 59
Syntax
DTime (List)
Example
d = DTime ([Y,M,D,h,m,s]) = 490136170778241