Register   Login
     
  Latest Posts  
RE: property sold!!! preselect search fields
by schwall on 9/06/2010 12:11 AM
RE: Main image and listing image
by smcculloch on 9/05/2010 6:12 PM
RE: Amazon S3 integration
by smcculloch on 9/05/2010 6:03 PM
RE: property sold!!! preselect search fields
by smcculloch on 9/05/2010 6:02 PM
RE: Property Manager as Classified Ads
by Rodney.Wimberly on 9/05/2010 5:14 PM
RE: property sold!!! preselect search fields
by j22 on 9/05/2010 12:34 PM
RE: [Suggestion] Review Form Features
by goblanks on 9/05/2010 11:26 AM
RE: property sold!!! preselect search fields
by schwall on 9/05/2010 10:26 AM
RE: property sold!!! preselect search fields
by KriDom on 9/05/2010 9:04 AM
RE: Property Agent Import&Export
by KriDom on 9/05/2010 8:51 AM
  Forums  
Subject: How to use date token
Prev Next
You are not authorized to post a reply.

Author Messages
topoulosUser is Offline
Silver Membership
Ventrian Super Newbie
Ventrian Super Newbie
Posts:22


12/05/2007 11:39 AM  

Hi guys, been looking through the forums, and I'm not sure how to use

[CREATEDATE:XXX]

 

can you specify any date format where the XXX is?  like

[CREATEDATE:MM/dd/yy]

or do you substitute something else there?  I saw there was something about editing the xml file associated, is this still necessary with this token?  could you provide a few examples of other formats that can be used?  (For example, is the / free text, etc.)

Thank you for your help!


***********************************
Tony Angelopoulos
Reelholes.com
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:18570


12/05/2007 6:15 PM  
The XXX uses the .net date formatting expressions.

e.g. [CREATEDATE:MMM dd yyyy]

A full list of date formatting expressions are:-

Dates

Note that date formatting is especially dependant on the system’s regional settings; the example strings here are from my local locale.
Specifier Type Example (Passed System.DateTime.Now)
d Short date 10/12/2002
D Long date December 10, 2002
t Short time 10:11 PM
T Long time 10:11:29 PM
f Full date & time December 10, 2002 10:11 PM
F Full date & time (long) December 10, 2002 10:11:29 PM
g Default date & time 10/12/2002 10:11 PM
G Default date & time (long) 10/12/2002 10:11:29 PM
M Month day pattern December 10
r RFC1123 date string Tue, 10 Dec 2002 22:11:29 GMT
s Sortable date string 2002-12-10T22:11:29
u Universal sortable, local time 2002-12-10 22:13:50Z
U Universal sortable, GMT December 11, 2002 3:13:50 AM
Y Year month pattern December, 2002

The ‘U’ specifier seems broken; that string certainly isn’t sortable.

Custom date formatting:
Specifier Type Example Example Output
dd Day {0:dd} 10
ddd Day name {0:ddd} Tue
dddd Full day name {0:dddd} Tuesday
f, ff, … Second fractions {0:fff} 932
gg, … Era {0:gg} A.D.
hh 2 digit hour {0:hh} 10
HH 2 digit hour, 24hr format {0:HH} 22
mm Minute 00-59 {0:mm} 38
MM Month 01-12 {0:MM} 12
MMM Month abbreviation {0:MMM} Dec
MMMM Full month name {0:MMMM} December
ss Seconds 00-59 {0:ss} 46
tt AM or PM {0:tt} PM
yy Year, 2 digits {0:yy} 02
yyyy Year {0:yyyy} 2002
zz Timezone offset, 2 digits {0:zz} -05
zzz Full timezone offset {0:zzz} -05:00
: Separator {0:hh:mm:ss} 10:43:20
/ Separator {0:dd/MM/yyyy} 10/12/2002

Scott McCulloch
Site Administrator
Déclic VidéoUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:1355


12/06/2007 5:42 AM  

This should be sticked at the top of the forum...

;-)

DV


Pinnacle Studio, proDAD and Boris FX tips and tricks, tutorials... Déclic Vidéo FX
topoulosUser is Offline
Silver Membership
Ventrian Super Newbie
Ventrian Super Newbie
Posts:22


12/06/2007 6:02 PM  
Excellent! Thank you SO much, that is fantastic!

***********************************
Tony Angelopoulos
Reelholes.com
You are not authorized to post a reply.
Forums > Modules > News Articles > How to use date token



ActiveForums 3.7