46910

What is the best way to say format is mm/dd/yyyy - but in the local format?

Excel appears to not have this (unless I missed it), but we're getting demand for it. And since we try to match Excel for the cell formatting syntax, I'd like to add this in in a way that makes sense.

So any suggestions on how to specify that you want a short/medium/long date/time/datetime formatted in the local layout? In other words I can spec so that in the US I get mm/dd/yy and in Germany yyyy mm dd.

thanks - dave

Answer1:

Actually, you can use the <strong>asterisk</strong> in the <strong>Cell Format menu</strong> to choose you cell to display depending on the current system regional settings.

For instance : *06/30/2011 would display differently depending on your system regional settings :

    <li>06/30/2011 for US or UK (for instance)</li> <li>30/06/2011 for France (for instance)</li> </ul>

    See here for more information.

    Answer2:

    Select the column/row or cell you want to format:

    right button > Format cells > Custom > Type

    There is some examples in the box below, some examples are:

    d-mmm-yy -> The single d stands for day of month, without leading zeros dd-mm-yyyy yyyy-mm-dd d/mmm/-yy -> mmm stands for name of the month dd/mm/yyyy -> You can also specify the separator yyyy/mm/dd

    And so on.

Recommend

  • spark udf with data frame
  • How to parse given date string using moment.js?
  • Find text(A) and replace it with text(B) + HTML
  • Using JQuery Datepicker To Only Show Months
  • Date format change angular 2
  • Thread 1: EXC_BAD_ACCESS ( code=2,address=0x8) Error c++
  • jaxb xsd prefix package names
  • Simplifying the use of meshgrid in Matlab
  • Visual Studio 2010 - 2015 does not use ymm* registers for AVX optimization
  • jQuery random blockquote
  • A simple datepicker in VueJS
  • How to make Plotly chart with year mapped to line color and months on x-axis
  • How to parsing NSDate to RFC 822 always use in English?
  • date: illegal option — d, Find difference between two dates
  • iOS Date formatting
  • help('modules') crashing? Not sure how to fix
  • Can XOR be expressed using SKI combinators?
  • text-align justify, cannot override
  • Is there any purpose for h2-h6 headings in HTML5?
  • Get localized short date pattern as String?
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • WPF version of .ScaleControl?
  • Center align outputs in ipython notebook
  • Android Activity.onWindowFocusChanged doesn't get called from within TabHost
  • Parse a date string in a specific locale (not timezone!)
  • ADO and msqli connections very slow
  • custom UITableViewCell with image for highlighting
  • PHP buffered output depending on server setting?
  • Sending data from AppleScript to FileMaker records
  • vba code to select only visible cells in specific column except heading
  • Font Awesome Showing Box instead of Icons
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • align graphs with different xlab
  • PHP: When would you need the self:: keyword?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Is it possible to post an object from jquery to bottle.py?
  • Does armcc optimizes non-volatile variables with -O0?
  • costura.fody for a dll that references another dll
  • Python/Django TangoWithDjango Models and Databases
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize