This isn't an answer to your specific question, but it's on topic. There are undocumented datetime format strings that you can use.  Get yourself to a unix system and do a "man date" and you will see other options  (some that work with Witango) that are NOT in the documentation.

Not everything on this list has been tested with Witango, the first thing that comes to my mind as something that wasn't in the Witango documentation that did work was %k, and %l which are the non padded "hour" values.  very handy when displaying a time for humans to look at.

Take the list below with a grain of salt, as i said, i haven't tested all of them, i just know that i use this instead of the Witango docs now, because those seemed to be out of date.  Also, our Witango App servers are Linux servers, so there is the possiblity that they use a library or something that causes the format strings to work for us, but might not for you. 

Also, another nice one that I came across that if you prefer to display pm instead of PM the %P will do the trick.

/John
       %%     a literal %
       %a     localeâs abbreviated weekday name (Sun..Sat)
       %A     localeâs full weekday name, variable length (Sunday..Saturday)
       %b     localeâs abbreviated month name (Jan..Dec)
       %B     localeâs full month name, variable length (January..December)
       %c     localeâs date and time (Sat Nov 04 12:02:33 EST 1989)
       %C     century  (year  divided  by  100  and  truncated  to an integer)              [00-99]
       %d     day of month (01..31)
       %D     date (mm/dd/yy)
       %e     day of month, blank padded ( 1..31)
       %F     same as %Y-%m-%d
       %g     the 2-digit year corresponding to the %V week number
       %G     the 4-digit year corresponding to the %V week number
       %h     same as %b
       %H     hour (00..23)
       %I     hour (01..12)
       %j     day of year (001..366)
       %k     hour ( 0..23)
       %l     hour ( 1..12)
       %m     month (01..12)
       %M     minute (00..59)
       %n     a newline
       %N     nanoseconds (000000000..999999999)
       %p     localeâs upper case AM or PM indicator (blank in many locales)
       %P     localeâs lower case am or pm indicator (blank in many locales)
       %r     time, 12-hour (hh:mm:ss [AP]M)
       %R     time, 24-hour (hh:mm)
       %s     seconds since â00:00:00 1970-01-01 UTCâ (a GNU extension)
       %S     second (00..60); the 60 is necessary to accommodate a leap  sec-
              ond
       %t     a horizontal tab
       %T     time, 24-hour (hh:mm:ss)
       %u     day of week (1..7);  1 represents Monday
       %U     week number of year with Sunday as first day of week (00..53)
       %V     week number of year with Monday as first day of week (01..53)
       %w     day of week (0..6);  0 represents Sunday
       %W     week number of year with Monday as first day of week (00..53)
       %x     localeâs date representation (mm/dd/yy)
       %X     localeâs time representation (%H:%M:%S)
       %y     last two digits of year (00..99)
       %Y     year (1970...)
       %z     RFC-2822  style  numeric  timezone (-0500) (a nonstandard exten-
              sion)
       %Z     time zone (e.g., EDT), or nothing if  no  time  zone  is  deter-
              minable



WebDude wrote:
Thanks Robert... wasn't even thinking of the <@CALC> tag. Works like a charm!


From: Robert Shubert [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 13, 2006 8:03 AM
To: [email protected]
Subject: RE: Witango-Talk: Date Format

I’ve found no easy way. I do wish that FORMAT had a set of non-leading-zero variables.

 

My work around:

 

<@CALC <@CURRENTDATE format=datetime:%m>>/<@CALC <@CURRENTDATE format=datetime:%d>>/<@CALC <@CURRENTDATE format=datetime:%y>>

 

If you need to use something like this often, you might want to consider building a custom tag.

 

Robert

 


From: WebDude [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 13, 2006 8:51 AM
To: [email protected]
Subject: Witango-Talk: Date Format

 

Witango 2000

 

Probably a stupid question, but is there a way to format a date as 2/6/06? (drop 0s in front of the month and day) I cannot find a date format like this. The best I can widdle it down is 02/06/06.

 

 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
  
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
  
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
  



________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to