Re: Time Display from Database

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14299
interpreted = N
texte = >Can anyone provide advice on how to display a time field from a database in >different format. > >The field entrytime stores the data in the format 12:35:31 >But when I display it in the document I would like it to be listed as 12:35pmGood point. We have lots of date formatting stuff, but not as much for times. The brute-force method might look like:[Format 5s][entrytime][/Format][ShowIf [entrytime]>11:59]p[/ShowIf][HideIf [entrytime]>11:59]a[/HideIf]mOr, you could store it in the database in the desired format:entrytime=[date %I:%M%p]Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Time Display from Database (Grant Hulbert 1997)
  2. Time Display from Database (Tim Rignold 1997)
>Can anyone provide advice on how to display a time field from a database in >different format. > >The field entrytime stores the data in the format 12:35:31 >But when I display it in the document I would like it to be listed as 12:35pmGood point. We have lots of date formatting stuff, but not as much for times. The brute-force method might look like:[Format 5s][entrytime][/Format][ShowIf [entrytime]>11:59]p[/ShowIf][HideIf [entrytime]>11:59]a[/HideIf]mOr, you could store it in the database in the desired format:entrytime=[date %I:%M%p]Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Grant Hulbert

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:

For those of you not on the WebCatalog Beta... (1997) F2 to F3 rocky transition (1997) International Orders (1998) b12 cannot limit records returned and more. (1997) Location of Webcat site in folder hierarchy (1997) Counting LineItems (2000) Removing [showif] makes a big difference in speed (1997) WebCat2b13MacPlugIn - more [date] problems (1997) Limit on amount of data browsers can parse? (2003) lineitems context in sendmail context (1998) Webcat run amuk (2002) bannerads (1998) WebCat Contest Now: Encrypt and Sell (1998) Items XX to XX shown (1997) A little help on e-mail (HELP!!! :-) ) (1998) [ConvertChars] problem (1997) PCS Emailer's role ? (1997) WebCat2b15MacPlugin - [protect] (1997) Re:Transfer of data from Invoice to thank you templates (1998) Bad Cookie (1998)