O'Reilly logo

Sams Teach Yourself ColdFusion® in 21 Days by Charles Mohnike

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Date and Time Functions

To understand how ColdFusion functions work with dates, it's important to first understand the difference between dates and times that are treated as plain text, and more complex date/time objects.

So far in this book, dates and times have been treated simply as text. When a user types a date into a form, for example, I've thus far stored the entry exactly as the user types it. The date is stored in my database table as plain text, the same as any other text string. When I need to display the date later, I can use a formatting function such as DateFormat() to change the way it appears in my pages, but that's about it.

To gain more control over dates and times, I can instead use date/time objects. Date/time objects are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required