Re: Converting SQL Microtime to Date and Time
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 46768
interpreted = N
texte = Jesse Williams-Proudman wrote:> I've got a database full of dates in Microtime from PHP and SQL and I need> them in a regular date/time format. Any conversion ideas?> Your SQL database will have a formatted date output; use that. I've never heard of any database using milliseconds as a basis for its internal date representation. You should be able to divide by 1000 (to get seconds since the epoch), divide by 60*60*24 to get to days, and then add the number of days from 0 -> Jan 1, 1970 to get to a WebCat date number. But I would really use the formatted date output from the database instead.HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Jesse Williams-Proudman wrote:> I've got a database full of dates in Microtime from PHP and SQL and I need> them in a regular date/time format. Any conversion ideas?> Your SQL database will have a formatted date output; use that. I've never heard of any database using milliseconds as a basis for its internal date representation. You should be able to divide by 1000 (to get seconds since the epoch), divide by 60*60*24 to get to days, and then add the number of days from 0 -> Jan 1, 1970 to get to a WebCat date number. But I would really use the formatted date output from the database instead.HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 301-429-5747-------------------------------------------------------------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://webdna.smithmicro.com/
John Peacock
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:
Multiple prices (1997)
OT: Limit on # of Pulldown entries (1997)
webcat database helper question (2000)
SQL statements (2002)
Email within tmpl ? (1997)
Problems getting parameters passed into email. (1997)
ShowNext Command (1997)
Banner DNA (1997)
form data submission gets truncated (1997)
Separate SSL Server (1997)
WebCat2b15MacPlugin - showing [math] (1997)
Symantec VIsual Page 1.0.3 (1997)
EXPR text bug? (2000)
Storebuilder SOLVED!!!!!!! (2003)
Formating found categories (1997)
Moving Webcatalog folder? (2001)
Cancel Subscription (1996)
summ=T (2003)
Cart creation techniques (was Problems with Price field) (1997)
PCS Frames (1997)