spacer
NC State University Home  College of Textiles Home
Search this site:
 
Intranet
Submit A Calendar Event
IT Projects
CAT 6 Rewiring Project
Computer/Software Order Status
Distance Education Classes
Use the Image Database
Departments
Textile & Apparel Technology & Management
Textile Engineering, Chemistry & Science
Textile Extension Education For Economic Development
TexLabs - Analytical and Product Development Services
Academic Programs
Business Services
Student & Career Services
Centers, Programs & Initiatives
People
Intranet
ITT Alliance
Comments/Suggestions
Home --> Information Technology

CF Date/Time Formatting

Today's date is {ts '2008-08-30 02:52:06'}

Using DateFormat, we can display that date in a number of different ways:

 

  • 30-Aug-08
  • Aug-30-2008
  • August 30, 2008
  • 08/30/2008
  • 30-Aug-2008
  • Sat, August 30, 2008
  • 30/8/08

Using DatePart, we can extract an integer representing the various dateparts from that value.

 

  • year: 2008
  • quarter: 3
  • month: 8
  • day of year: 243
  • day: 30
  • weekday: 7
  • week: 35
  • hour: 2
  • minute: 52
  • second: 6

The current time is:02:52 AM

You can also show the Month by giving an integer like:May

Return to the Code Examples Page.

This will calculate the difference in time

 


 
TCO
Support
Student Computing
Computer Labs
Nomadic/Wireless Coverage
Order Status
TCO Staff
 
Media Services
CD/DVD Media
Online Tutorials
Media Check History
Streaming/Recording Links
Web Services
Current/Past Projects
Server Structure
Wolfware/WebCT/Webassign
Free Images and Music
Code Examples
Cold Fusion Help
spacer
spacer