Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi everyone,
Trying to convert the Month/Day/Year to Day/Month/Year format and unfortunately it always default to the Month/Day/Year. Is there anything I should be considering?
dt_settings = c4d.BaseContainer() dt_settings.SetBool(c4d.DATETIME_DATE_CONTROL, True) dt_settings.SetBool(c4d.DATETIME_CALENDAR_OPEN, True) self.date = self.AddCustomGui(TRELLO_DEAD_TEXTBOX, c4d.DATETIME_GUI, "", c4d.BFH_LEFT, 0, 0, dt_settings) dt = datetime.strptime('16.07.2011', "%d.%m.%Y") dtd = c4d.DateTimeData() dtd.SetDateTime(dt) self.date.SetDateTime(dtd)
Output:
Thank you all in advance!
Andre
Hello,
the date format is actually language depended and hard-coded.
You can look into the file \resource\modules\xtensions\strings_en-US\c4d_strings.str in your Cinema 4D installation (assuming you have installed the English language pack). There you find the line
\resource\modules\xtensions\strings_en-US\c4d_strings.str
IDS_DATE_FORMAT "M / D / YYYY";
This string defines how the date is formatted in the given language. So you cannot change the behaviour of the DATETIME_GUI. You can only switch the language.
best wishes, Sebastian
@s_bach Hi Sebastian,
Thanks for your help! That makes sense!