Data360 Analyze

 View Only
  • 1.  Create datetime in transform node

    Employee
    Posted 07-16-2019 01:38

    Hello,

     

    How can is use a self defined datetime in the transform node?

    The following expresion is not working.

    datetime.datetime(2015-01-01 00:00:00)



  • 2.  RE: Create datetime in transform node

    Employee
    Posted 07-16-2019 02:57

    When creating a datetime object from, essentially, as string you need to use the strptime() function to parse the string. You must specify the value as a string (i.e. enclosed in apostrophes/quotes in your example above) and you must specify the format to be assumed when parsing the string.

    See the Python Documentation for details of using the strptime() function.

     



  • 3.  RE: Create datetime in transform node

    Employee
    Posted 07-16-2019 03:03

    You may also be interested in some of the Python snippets included in this document that describe the usage of a range of Python functions within the Transform node.