Last active
August 29, 2015 14:09
-
-
Save abramadams/dba95cc6009fc3bd6468 to your computer and use it in GitHub Desktop.
ISO Date/Time To CF Date/Time Regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
date = '2014-12-14T08:28:52.796Z'; | |
convertedDate = date.ReplaceFirst( | |
"^.*?(\d{4})-?(\d{2})-?(\d{2})T([\d:]+).*$", | |
"$1-$2-$3 $4" | |
); | |
writeDump( [ date, convertedDate ] ); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment