brihol44
asked on
DateFormat / Timestamp
I know this should be easy but I can't seem to find out the following. If I'm using a JavaScript calendar and the formatting is yyyy/mm/dd when a date is selected. How can input the the yyyy/mm/dd formated text to a timestamp so I can format the date however I need to in the future. For example : {ts '2007-07-26'} format.
Thanks,
Brian
Thanks,
Brian
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That is not neccessary. yyyy/mm/dd is indeed how coldfusion expects it for the parsedateeimt function. You would only have to do the createDate method if you were using yyyy/dd/mm and then it would be :
<cfset theDate = createDate( listFirst(theString,"/"), listLast(theString,"/"), listGetAt(theString,2,"/") )>
try it out:
<cfset mydate="2007/12/1">
<cfoutput>#parsedatetime(m ydate)#</c foutput>
<cfset theDate = createDate( listFirst(theString,"/"), listLast(theString,"/"), listGetAt(theString,2,"/")
try it out:
<cfset mydate="2007/12/1">
<cfoutput>#parsedatetime(m
#ParseDateTime(form.fieldN