Hi,
With the IgbDateTimeColumn type, I can see that the DateTimeFormat property offers a (very limited) set of pre-defined formats, but how is it possible to specify a custom format? For example to include milliseconds? I looked at FormatString which seems to always convert the date object using the default javascript format, and also I couldn't find any examples for FormatOverride or FormatOverrideScript. Is custom formatting possible without using a IgbTemplateColumn?
Thanks,
Graham.
Thanks, that works really well. Perhaps it's worth adding this to the 'DateTime Column' section in the 'Column Types' page? It would have saved some time.
HelloGraham,
Thank you for your post. I have been investigating into the behavior you are looking to achieve in this case, and in order to apply a format to your columns, you need to use the different “format specifiers” that we provide.
The FormatString property in this case does not currently support .NET format strings – it is more used to determine which of the format specifiers you are looking to apply. For example, you can apply a date time format to an IgbDateTimeColumn by using the following code:<IgbDateTimeColumn Field="Date" FormatString="{0}"> <IgbDateTimeFormatSpecifier Locale="en-UK" DateStyle="full"/></IgbDateTimeColumn>The way that the IgbDateTimeFormatSpecifier works is the same as an Intl.DateTimeFormat object, which you can read about here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat. Each property that exists on the Intl.DateTimeFormat exists on the IgbDateTimeFormatSpecifier and is converted directly into the Intl.DateTimeFormat.Please let me know if you have any other questions or concerns on this matter.