Hello I have a function that generates the date with this format:
MM-DD-YYYY
Is there any jquery or javascript trick to convert that value into:
YYYY-MM-DD
?
More Detailed Explanation:
The function I have generates the date and stored in a variable called tdate
So var tdate = 01-30-2001
I would like to do some jquery or javascript to turn tdate
into:
tdate = 2001-01-30
tdate is a string
Thanks!