Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral 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