Time and Date¶
Note
Date variables in a GAUSS dataframe store dates in Posix format, so all “posix” functions work with GAUSS date variables.
Conversion and formatting¶
Converts columns of matrices, string arrays or dataframes to dates, with the option to specify the display format. |
|
Converts DT scalar format to POSIX date/time format. |
|
Converts a matrix containing dates in DT scalar format to a string array. |
|
Converts a date in DT Scalar format into a string array. |
|
Converts elapsed time in hundredths of a second to a string, with days, minutes, hours and seconds. |
|
Converts a date in Posix time (seconds since the Epoch) into a string array. |
|
Converts a string array of dates to a matrix in DT scalar format. |
|
Converts string dates to a matrix containing dates in DT Scalar date/time format. |
|
Converts string dates to a matrix containing dates in Posix date/time format. |
Sequences¶
Creates a sequence of dates in DT scalar format. |
|
Creates a sequence of dates in Posix date/time format. |
Differences and arithmetic¶
Difference between two times, as a 4x1 date vector returned by date, in days. |
|
Difference between two times, as a 4x1 date vector returned by date, in hundredths of a second. |
|
Returns elapsed time since midnight in hundredths of a second. |
|
Adds (or subtracts) time to a DT scalar. |
|
Adds (or subtracts) time to a posix date-time. |
|
Computes the difference between two dates in DT scalar format. |
|
Computes the difference between two dates in Posix date/time format. |
Current time and date¶
Creates a matrix in DT scalar format containing only the hour, minute, and second. The date information is zeroed out. |
|
Returns system date in DT scalar format. The time returned is always midnight (00:00:00), the beginning of the returned day. |
|
Returns system date and time in DT scalar format. |
Other¶
DTV Date Time Vectors¶
Returns current system date in a 4x1 vector. |
|
Formats a 4x1 date vector, as returned by date, as |
|
Formats a 4x1 date vector, as returned by date, as |
|
Formats a 4x1 date vector, as returned by date, as |
|
Returns the day of year as an integer from a 3x1 or 4x1 vector as returned by date. |
|
Returns the day of week as an integer from a 3x1 or 4x1 vector as returned by date. |
|
Converts DT scalar format to DTV vector format. |
|
Normalizes a date and time (DTV) vector. |
|
Converts DTV vector format to DT scalar format. |
|
Returns current system time as a 4x1 vector. |
|
Formats time as |
UTC functions¶
These functions are generally not recommended, because they will make adjustments based on your current time zone.
Converts DT scalar format to UTC scalar format. |
|
Converts DTV vector format to UTC scalar format. |
|
Returns the number of seconds since January 1, 1970 Greenwich Mean Time. |
|
Converts UTC scalar format to DT scalar format. |
|
Converts UTC scalar format to DTV vector format. |
Other DT scalar functions¶
Combines separate scalars or vectors representing year, month, day, hour, minute, second to create a matrix in DT scalar format. |
|
Creates a matrix in DT scalar format containing only the year, month, and day. Time of day information is zeroed out. |