CF Coding Practices
  • General Coding Practices
  • Debugging JSON-based CFC Methods
    • Valid JSON Formatting
    • Validating JSON
    • Final Hints
  • How We Invoke Modals
  • Submit Handlers
  • Useful SQL Snippets
  • jQuery/JS How-Tos And Hints
  • jQuery dataTables Tricks
  • CFSCRIPT Snippets and Hints
  • StatusPage Integration
  • Windows Server Setup
  • Common CF Formatting Commands
  • CF Snippets & Hints
  • Developing With The Mura Platform
    • ContentRenderer.CFC
    • Iterators
    • Iterating Remote Feeds
    • Components
    • Nested Content and Interactive Page Assembly
    • Modules and Display Objects
Powered by GitBook
On this page
  • DateFormat
  • DateFormat Masks

Was this helpful?

Common CF Formatting Commands

DateFormat

DateFormat() alls you to perform formatting on common date strings in the format DateFormat([date string],[format mask string]). Format mask string formatting is as follows:

DateFormat Masks

Mask

Example Value

Description

d

1

Day of the month as a number

dd

01

Two digit day of the month

ddd

Mon

Three character day of the week.

dddd

Monday

The full day of the week

m

6

The month as a number.

mm

06

The month as a two digit number.

mmm

Jun

The month as a three character string.

mmmm

June

The full month name.

y

7

Year as a single digit if less than 10

yy

07

Last two digits of the year

yyyy

2007

The year

short

6/1/07

Same as m/d/yy

medium

Jun 1, 2007

Same as mmm d, yyyy

long

June 1, 2007

Same as mmmm d, yyyy

full

Friday, June 1, 2007

Shortcut for dddd, mmmm d, yyyy

PreviousWindows Server SetupNextCF Snippets & Hints

Last updated 6 years ago

Was this helpful?