PDA

View Full Version : Help: How to get date input in specific syntax



yurble_vn
03-17-2008, 09:21 PM
Hi All,

You all may know, in some country the date format is different to English style. For example, in Vietnam, we note date like: dd/mm/yyyy not mm/dd/yyyy

But with excel, it just understand date like: mm/dd/yyyy

Is there anyway to get excel understand date when I input: dd/mm/yyyy?

Thanks in advance

mdmackillop
03-18-2008, 12:42 AM
How are your requirements set in in Control Panel/Regional & Language Settings?

xld
03-18-2008, 02:09 AM
Excel understands many date formats, as a date is just a number since 1st Jan 1900, what you see on screen is just a presentational layer, and that can be formatted (almost) however you like. VBA is a bit trickier as VBA works with US style dates.

Tell us the specific problem yu are getting.

yurble_vn
03-18-2008, 07:47 AM
Thanks all,

FYI, I input

18/03/08 in cell A1 --> excel keep unchange
03/18/07 in cell B1 --> excel understand and change it to 3/18/07

make a subtraction: C1=A1-B1 ---> return value is: #VALUE!


SO, excel just understand the B1 as date, but not A1

What I mean in the above post is the input syntax. Excel force to input date under mm/dd/yy. If not, it wont be able to understand this as date type.

It there anyway to change?

yurble_vn
03-18-2008, 07:54 AM
Thanksmdmackillop (http://vbaexpress.com/forum/member.php?u=87)
You right,

But after this, can I conclude that this depends totally on machine. And can not customize in a particular excel file?

THanks

mdmackillop
03-18-2008, 08:43 AM
Cells can be custom formatted to any acceptable format. If there is a danger of confusion, maybe you could use "d mmm yy" as your Short Date.

mdmackillop
03-18-2008, 10:55 AM
I find that 03/18/07 is not recognised as a date (nor would I expect it to be)