{"id":1072,"date":"2014-06-20T17:25:15","date_gmt":"2014-06-20T22:25:15","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=1072"},"modified":"2014-06-20T17:25:15","modified_gmt":"2014-06-20T22:25:15","slug":"createdatetime-is-not-a-valid-date-format","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2014\/06\/createdatetime-is-not-a-valid-date-format\/","title":{"rendered":"createDateTime is not a valid date format"},"content":{"rendered":"<p>While transferring an application from a ColdFusion 9 server to a ColdFusion 10 server, it produced the following error:<br \/>\n<strong>createDateTime is not a valid date format<\/strong><\/p>\n<p>I was able to trace the error to the following line:<br \/>\n<code>parseDateTime(myDate, 'yyyymmdd')<\/code><\/p>\n<p>(Of note is that the troublesome line does not actually call createDateTime. Maybe it does under the hood?)<\/p>\n<p>The myDate variable was the result of a createDate call, and looked like this:<br \/>\n<code>{ts '1985-10-26 00:00:00'}<\/code><\/p>\n<p>I have no idea why &#8216;yyyymmdd&#8217; was specified as the expected format, nor do I know why CF9 was more forgiving about it than CF10. If you run into this error, the format parameter is definitely something to check.<\/p>\n<p>As an aside, the Adobe documentation is terrible as usual: <a href=\"https:\/\/wikidocs.adobe.com\/wiki\/display\/coldfusionen\/ParseDateTime\">https:\/\/wikidocs.adobe.com\/wiki\/display\/coldfusionen\/ParseDateTime<\/a><\/p>\n<p>It lists 2 parameters, date\/time string and pop-conversion, but gives no examples of the latter. And of course there is a 3rd parameter, the date format. This is the documentation for CF11&#8211;as far as I can tell there is no pop-conversion parameter in CF10 or earlier&#8211;but the page does not clearly indicate which version it covers, nor does it provide a link to the same content for earlier versions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While transferring an application from a ColdFusion 9 server to a ColdFusion 10 server, it produced the following error: createDateTime is not a valid date format I was able to trace the error to the following line: parseDateTime(myDate, &#8216;yyyymmdd&#8217;) (Of note is that the troublesome line does not actually call createDateTime. Maybe it does under &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2014\/06\/createdatetime-is-not-a-valid-date-format\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">createDateTime is not a valid date format<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[349,334],"class_list":["post-1072","post","type-post","status-publish","format-standard","hentry","category-coldfusion","tag-coldfusion","tag-documentation"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=1072"}],"version-history":[{"count":3,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1072\/revisions"}],"predecessor-version":[{"id":1076,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1072\/revisions\/1076"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=1072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=1072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=1072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}