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:

WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Error: Too many nested [xxx] contexts (1997) More DateMath problems (1997) WebDNA Payment Alternatives (2003) user submitted data REPOST (2000) [shownext max=?] armed (1997) unable to launch acgi in WebCat (1997) State DB & TIme Zones (2003) GuestBook example (1997) dos performance (1998) Listserver problem (1997) New Command prefs ... (1997) Which beta for w* 4.1 and a problem w/b12 (1999) Canadian Postal Codes (2001) [showif]?[/showif] (2000) Smith Micro SUPPORT? (2000) Word Breaks (1998) [WebDNA] An actual attempt to get WebDNA and MAMP Pro to work - (2018) check out page (SSL) not loading on Netscape 4.0+ - fixed? (1999) WebSTAR plugin update (2004)