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#
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#
Dataframe date variables#
Converts vectors in Posix time or string dates to a GAUSS date variable and optionally sets the date display format. |
|
Extracts the day from a date/time variable as a string name. |
|
Extracts the day of the month from a date/time variable as a decimal number (1-31). |
|
Extracts the day of the week from a date/time variable as a decimal number. |
|
Extracts the day of the year from a date/time variable as a decimal number (1-366). |
|
Extracts the hour from a date/time variable as a number (1-12 or 1-24). |
|
Extracts the minute from a date/time variable as a number (0-59). |
|
Extracts the month from a date/time variable as a decimal number(1-12). |
|
Extracts the month from a date/time variable as a string name. |
|
Extracts the quarter from a date/time variable (1-4). |
|
Extracts the seconds from a date/time variable as a number (0-59). |
|
Extracts the week from a date/time variable as a number (0-53). |
|
Extracts the year from a date/time variable as a number. |
|
Gets BSD strftime format specifiers for specified columns of a dataframe. |
|
Specifies how GAUSS should display dates using the BSD strftime format specifiers. Note that this will also convert the type of the columns specified by column to Date. |