Data360 Analyze

 View Only
  • 1.  Split DateTime Format into Date and Time

    Posted 02-22-2021 18:49

    Not too familiar with the new upgrade version but from LAE, I was able to split this datetime format below. Can anyone help me on how to split the date from time as two separate field as Data and Time on Data360? 

    2021-01-01T00:01:35+1300



  • 2.  RE: Split DateTime Format into Date and Time

    Employee
    Posted 02-23-2021 03:44

    If the data is a string that contains the date time value, the first step would be to convert it to a datetime type.

    The Modify Fields node can be used to perform this transformation:

    There are various ways you can then extract the date and time elements from the datetime value. 

    A Transform node can be used as follows:

    Note that the code needs to explicitly handle the case where the value is Null.

    A Calculate Fields node can also be used in a simmilar way:

    In this case, the node was configured so that the default value for a Null datetime value is configured to be Null:

    The Calculate Fields provides alternative default values that can be used when an input datetime value is Null:

    If the  node is configured so that the default for a Null datetime value is set to 'Today', 'Now' or the epoc, the expressions can be simplified to the following:

     

    If you had simply wanted to convert the datetime value to either a Date type or a Time type (without retaining the original datetime field) you can simply use a Modify Fields node:

    An example data flow is attached belows (requires v. 3.6.0 or above).

    The Help documentation includes a topic for Ex-LAE users on using Date, Time and Datetime functions in Data360 Analyze. The documentation also includes topics on other functions too.

    Searching the Community forum for "extract date" will also yield some  additional examples and related information.

     

    Attached files

    Extract Date and Time Elements - 23 Feb 2021.lna

     



  • 3.  RE: Split DateTime Format into Date and Time

    Posted 02-24-2021 12:45

    Thanks Adrian for the help, its work.