Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel cdate prob

Status
Not open for further replies.
Mar 25, 2003
34
0
0
GB
I have a column of TEXT formatted cells in the with dates in the format DD/MM/YYYY. when using cdate in vba to convert to a date, the dates seem to randomly convert to both UK & USA date formats, even if i use the format command to try and force it to DD/MM/YYYY ... any ideas?????
 
Hi TroyMcClure72,

Just how randomly? Can you give some examples?

My understanding is that CDate will use the regional settings to resolve any ambiguities - if a string can only be interpreted in one way the regional settings will have no effect. For example "11/13/2004" and "13/11/2004" will both return the 13th of November regardless.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top