Ok, I know I did a Zeus POTW earlier this week, but I had to share this little gem. This is another small thing – a simple function – and something that’s been possible via a CFLib UDF for years. That being said – when I saw this show up in the latest Zeus build today, I had to share.

If you’ve ever needed to format a date and a time, you know that it requires two calls, ala:


<cfoutput>
#dateFormat(now())# #timeFormat(now())#
</cfoutput>

Zeus adds dateTimeFormat to combine this into one call:


<cfoutput>
#dateTimeFormat(now())#<br />
</cfoutput>

For formatting, the mask is slightly different than before. Masks are based on SimpleDateFormat from Java. So for example:


<cfoutput>
#dateTimeFormat(now(), "MMMM d, yyyy h:mm a")#<br />
</cfoutput>

Yeah, ok, not Earth-shattering, but this was one of a few new functions released in the latest Zeus build that were things I’ve seen requested for years.

One Response to “ColdFusion Zeus POTW – Extra edition…”

  1. Hope this version works on first install, i changed my computers HDD to SSD and Coldfusion never installed. One Transcend IDE SSD, 1 Seagate hybrid, CF stucks on configuration stage, frozen… never complete the final stages. Vers, 7,8,9 all failed.. İm very surprised and shocked.. How can i find and win98, 4200RPM oldies and the CF 6.1, i dont know…

Leave a Reply