Removing leading zeros when formatting times or dates

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39479
interpreted = N
texte = Is there a way *within* a [format] to remove the leading zero that gets put on days and hours?That is, I want:[format seconds_to_time %I:%M %p]68400[/format]to return 7:00 pm (it currently returns 07:00 pm) without having to special-case the hour each and every time with a double format like this:[math][format seconds_to_time %I]68400[/format][/math][format seconds_to_time :%M %p]68400[/format]The same thing holds true for days. Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Removing leading zeros when formatting times or dates (Rob Marquardt 2001)
Is there a way *within* a [format] to remove the leading zero that gets put on days and hours?That is, I want:[format seconds_to_time %I:%M %p]68400[/format]to return 7:00 pm (it currently returns 07:00 pm) without having to special-case the hour each and every time with a double format like this:[math][format seconds_to_time %I]68400[/format][/math][format seconds_to_time :%M %p]68400[/format]The same thing holds true for days. Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Rob Marquardt

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog can't find database (1997) Never ending problem.... (2000) [WebDNA] Pretty URLS (2011) problem: mail changed (1997) A Global Variable (1997) FEA REQ: One .hdr, multiple .db's (2003) 2.0 Info (1997) There's a bug in the math context ... (1997) Help name our technology! (1997) Cyberstudio and WebDNA (1997) TinyStore Question (1999) Test (2003) Restricting templates from causing havoc (2000) New WebCatalog site! (1997) Template Encryption (1998) [Fwd: F3 database munching] (1997) URGENT: WebCatalog 2.0 (1998) WebMerchant 1.6 and SHTML (1997) Does [Sendmail] create html? (2002) HELP WITH DATES (1997)