Link to home
Start Free TrialLog in
Avatar of rwallacej
rwallacej

asked on

Javascript create date object from mm/dd/yy or dd/mm/yy

Hi
I have date field in dd/mm/yy format (or mm/dd/yy format) and need to convert to javascript date object.
How do I do this? Please provide code snippet....I'm sure this can't be too difficult but haven't found solution
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of MMDeveloper
MMDeveloper
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rwallacej
rwallacej

ASKER

hi MMDeveloper

Thanks for input.

I tried with the
new Date(yy, mm-1, dd)
but doesn't work.....seems like you need 'yy' as 'yyyy' e.g. 1990 instead of 90.

I overcame whole issue by setting format of calendar to be dd/mm/yyyy, but a solution to this would be good if possible.