Title:
Quick tip: escaping string literals in dateTimeFormat()
|
View in Portal
<p>Just a quick tip since I didn’t find this to be well documented anywhere and someone else probably has this exact same problem. Frequently, I display time and date on a page. I used to do it like so: #dateFormat(now(),'dddd, mmmm d, yyyy')# at #timeFormat(now(),'h:mm tt')# …but why use two functions when you can use one, right? So I tried using the following: #dateTimeFormat(now(),'dddd, mmmm d, yyyy at h:mm tt')# But got briefly stuck when the ‘t’ in the date […]</p>
<p>The post <a rel="nofollow" href="https://coldfusion.adobe.com/2018/12/quick-tip-escaping-string-literals-in-datetimeformat/">Quick tip: escaping string literals in dateTimeFormat()</a> appeared first on <a rel="nofollow" href="https://coldfusion.adobe.com">ColdFusion</a>.</p>
Comments: