Date Time format

Is it possible to get the date and time in another format?

like ‘January 25, 2017’ instead of ‘25-1-2017’

I believe it is coming soon.

Thanks John,
So I have to wait for a bit :slight_smile:

1 Like

@Robert_Klempau
here is a simple python solution using the datetime module

import sys
sys.path.append(r"C:\Program Files (x86)\IronPython 2.7\Lib")

from datetime import datetime
now = datetime.now()
str_format = IN[0]

OUT = now.strftime(str_format)
# >>>  25-01-2017

Formatting options:
https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior

4 Likes

Thanks, :+1:

Great. It works fine.

For the lazy

DatetimeNow Formatting

2 Likes

The Python script still works like charm! Thanks @Gui_Talarico!

Noticed that @Robert_Klempau published the solution on the Autodesk Knowledge Network. Great!

1 Like