Create datetime in transform node
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)
-
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.
-
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.
Please sign in to leave a comment.
Comments
2 comments