Skip to main content linkedinfacebooktwittermenuarrow-up

Support for culture specific Date only and Time only formats for cell Declined

We need a way for writing excel file with Date only and Time only values which are displayed accordingly to user locale (it's a default format for date and time values inserted right in Excel). It is my understanding that currently (v3.7) we have the only option - provide exact number format to display time or date only. I attached example 'DateFormatExamples.xlsx' with locale specific formats for time and date.

Comment (1)

Mario at GemBox
Hi, All data that has locale-sensitive formatting (like dates, currency, etc.) is defined by the invariant culture format string and the end result (displayed data in MS Excel application) is a combination of the used format string and machine's Region and Language settings. The invariant culture format string is always defined as an English format string and then even though the file has an English format string Excel interprets and displays the data correctly according to the end user's locale settings. You can also try this out by creating a sample spreadsheet and viewing the same file with different Region settings. If interested you can also read more about this Excel behavior on the following link: Regards, Mario