Support Center

Welcome back, guest

Register or login below.

Knowledgebase

Feedback

1
Voting closed
Declined

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

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.

1 Comment

  • 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 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 behaviour on the following link:
    http://msdn.microsoft.com/en-us/library/bb157877.aspx


    Regards,

    Mario
    Gemmeus d.o.o.
    www.GemBoxSoftware.com