GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
GetDateTimeComponents Function
Overview
The GetDateTimeComponents function converts a date-time qword to a formatted string.
Syntax/Parameters
Syntax
int [] = GetDateTimeComponents ( qword value | string value, [int format] );
Parameters
value
A qword containing a date-time value in milliseconds or a string in various formats. The time zone is not considered in the processing.
format
An optional int containing bitwise flags for the source value formatting. This parameter only applies to a string value type. The default formatting mode is ISO-8601 as designated by SD_ISO_8601. See Remarks for additional options.
Return Value
Returns an int array containing the date-time components or an empty string on failure. Use the GetLastError function to retrieve error information.
Remarks
When the source value is a string, the format parameter can be as follows:
Definition | Bitwise | Description | |||||
Modes | |||||||
SD_PARSEMODE | 0x0000000F | String Parse Mode Mask | |||||
SD_AMERICAN | 0x00000000 | String is American (mm/dd/yy) | |||||
SD_EUROPEAN | 0x00000001 | String is European (dd/mm/yy) | |||||
SD_ISO_8601 | 0x00000002 | String is ISO-8601 | |||||
Options | |||||||
SD_PARTIAL | 0x00010000 | Can be Partially Formatted |
The returned array elements are named as follows:
Key Name | Description | |||
Year | Year value. | |||
Month | Month value. | |||
DayOfWeek | Day of week value. The first day is 0, or Sunday, while the last is 6, or Saturday. Note this is only valid when getting components from a date-time qword value as opposed to a date string. There is no way of differentiating an empty index from Sunday. The days are defined in the SDK. DOW_SUNDAY — 0 DOW_MONDAY — 1 DOW_TUESDAY — 2 DOW_WEDNESDAY — 3 DOW_THURSDAY — 4 DOW_FRIDAY — 5 DOW_SATURDAY — 6 |
|||
Day | Day of month value. | |||
Hour | Hour value. Value will be zero if not included in the incoming value parameter. | |||
Minute | Minute value. Value will be zero if not included the incoming value parameter. | |||
Second | Second value. Value will be zero if not included the incoming value parameter. | |||
Milliseconds | Milliseconds value. Value will be zero if not included the incoming value parameter. |
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.