IvyTools
General Category => General Discussion => Topic started by: Antony on April 12, 2018, 09:24:18 AM
-
Dear Ivy team,
Is there a way to specify date/time format for "toDate()" function? It doesn't seem to work for dates in did/mm/yyyy format, only mm/dd/yyyy.
Thanks,
Antony G.
-
Hi Antony,
It can be done in the latest release:
IvyOptions.ToDateFormatMonthFirst = true;
If you are using IvyTemplateEditor it can be set on the template level (Template Settings / Template Custom Code):
protected override void Init()
{
IvyOptions.TableCellType = TableCellType.String;
IvyOptions.ToNumberCultureInfo = new CultureInfo("fr-FR");
IvyOptions.ToDateFormatMonthFirst = true;
}
Regards,
Ivy Team