开发者

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 s开发者_如何学JAVAo that in the US I get mm/dd/yy and in Germany yyyy mm dd.

thanks - dave


Actually, you can use the asterisk in the Cell Format menu 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 :

  • 06/30/2011 for US or UK (for instance)
  • 30/06/2011 for France (for instance)

See here for more information.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜