Share via

Excel Time Format

Anonymous
2013-04-23T03:05:57+00:00

How to make a time value international readable.

I use C++ to export a time value (digital) to a Excel Cell, It is like such format:41346,8918485185, this value correponds to “13.03.2013  21:24:16” when i using "yyyy-mm-dd hh:mm:ss" to format this cell. But this view will get changed when I change my "Formats" under "Region and Language" in system control panel, say "Germany", It will show "yyyy-24-dd 21". I find if i want to sustain the same view, i need to adjust customized format like "JJJJ-MM-TT h:mm:ss".

Is there any possible to export and format a date/time value to localized view? or even a readable view?

Pls kindly suggest.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. Anonymous
    2013-04-24T06:01:51+00:00

    Hi,

    Whatever you do, the display will change according to the regional settings if you leave the format as General or date/time. The only way to circumnavigate this is to use a string/text format for that cell..

    regards

    JY

    Was this answer helpful?

    0 comments No comments
  2. Héctor Miguel 71,595 Reputation points
    2013-04-24T04:08:17+00:00

    see section: "using strings as worksheet function arguments" in this page from Ron de Bruin site:

    http://www.rondebruin.nl/win/s9/win013.htm

    hth,

    hector.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-04-24T02:11:42+00:00

    I find that "yyyy-mm-dd hh:mm:ss" is the most format way to format this DateTime value, "JJJJ-MM-TT h:mm:ss" is the corresponding format under "German/Germany" and "jj/mm/aaaa hh:mm:ss" under "French/France". 

    So, is there any way to get these format strings when i retrieve system location?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-04-24T01:57:28+00:00

    Thank you very much. 

    Same solution I use program to set the format of this column into "yyyy-mm-dd hh:mm:ss", this will take effection under many contexts. But when you switch your Region into some Europe contries, this will display differently. Like "Germany" for example, this format will bring out  "yyyy-24-dd 21:24:16", not readable really.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-04-23T13:19:59+00:00

    I copied you number to A1 (replacing the comma by a period, since that is what I used for the decimal point)

    Then in B1 I entered =TEXT(A1,"yyyy-mm-dd hh:mm:ss")

    This displayed 2013-03-13 12:24:16

    best wishes

    Was this answer helpful?

    0 comments No comments