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:

OSX Webcatalog Install (2001) WebCat2 - Getting to the browser's username/password data (1997) Secure Server (1997) WebCat2 beta 11 - new prefs ... (1997) NT BETA BUG???? (1997) Formating found categories (1997) FlushDatabase Suggestion (1998) There's a bug in the math context ... (1997) To Do list (2003) WebCat b13 CGI -shownext- (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Re:no template caching (1997) [WebDNA] listvariables (2014) RE: Answer: WebDelivery downloads alias, not original ? (1997) Download (1999) Odd Cart Behavior (1997) Location of Webcat site in folder hierarchy (1997) Plugin or CGI or both (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Help with [LineItems] in [OrderFile] on ShoppingCart.tpl (2003)