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, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>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, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/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:
Problem with updating to 2.1.1 (1998)
Re:Variable Math (1998)
page redirect in webDNA (1997)
OBDC Support (1997)
PCS Frames (1997)
variables in [addlineitem] (1998)
posting problems + Webcat 3.0.7 available - did anyone know? (2000)
Database Not Found Problem (2004)
[OT] Linux Mailservers (2003)
Multiply prices (1997)
shipping formula (2000)
Displaying raw values (1998)
File info on files with funky characters in their names (2003)
[WebDNA] Admin Login Required to Serve any TPL Page (2009)
WebCat Code and WebStar Search? (2000)
relational db question (2002)
X etc.... (1999)
Netscape Communicator 4 chops off URLs (was No Data) (1997)
WebCat2: Items xx to xx shown, etc. (1997)
Subtotal Not Calculated on Invoice.html (1998)