dbTalk Databases Forums  

milliseconds in mySQL

comp.databases comp.databases


Discuss milliseconds in mySQL in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zgb
 
Posts: n/a

Default milliseconds in mySQL - 02-18-2008 , 03:27 PM






Hi, I'm using mySQL version 5.0.45.
Is it possible to store the time in milliseconds format?
I've tried with TIMESTAP and DATETIME column types, it doesn't work.
With TIME column type I can put value up to microsecond - etc.
14:02:01.199999 but when i refresh the table data everything after
decimal point is gone, result is 14:02:01
I've also tried mySQL version 5.1, same thing.

Best regards

Reply With Quote
  #2  
Old   
Troels Arvin
 
Posts: n/a

Default Re: milliseconds in mySQL - 02-18-2008 , 03:56 PM






On Mon, 18 Feb 2008 22:27:32 +0100, zgb wrote:
Quote:
Is it possible to store the time in milliseconds format?
No. With MySQL, you will have to invent your own system for this, such as
storing the fractional seconds in a separate integer column.

--
Regards,
Troels Arvin <troels (AT) arvin (DOT) dk>
http://troels.arvin.dk/


Reply With Quote
  #3  
Old   
Troels Arvin
 
Posts: n/a

Default Re: milliseconds in mySQL - 02-18-2008 , 03:56 PM



On Mon, 18 Feb 2008 22:27:32 +0100, zgb wrote:
Quote:
Is it possible to store the time in milliseconds format?
No. With MySQL, you will have to invent your own system for this, such as
storing the fractional seconds in a separate integer column.

--
Regards,
Troels Arvin <troels (AT) arvin (DOT) dk>
http://troels.arvin.dk/


Reply With Quote
  #4  
Old   
Troels Arvin
 
Posts: n/a

Default Re: milliseconds in mySQL - 02-18-2008 , 03:56 PM



On Mon, 18 Feb 2008 22:27:32 +0100, zgb wrote:
Quote:
Is it possible to store the time in milliseconds format?
No. With MySQL, you will have to invent your own system for this, such as
storing the fractional seconds in a separate integer column.

--
Regards,
Troels Arvin <troels (AT) arvin (DOT) dk>
http://troels.arvin.dk/


Reply With Quote
  #5  
Old   
zgb
 
Posts: n/a

Default Re: milliseconds in mySQL - 02-18-2008 , 04:38 PM



Troels Arvin wrote:
Quote:
On Mon, 18 Feb 2008 22:27:32 +0100, zgb wrote:
Is it possible to store the time in milliseconds format?

No. With MySQL, you will have to invent your own system for this, such as
storing the fractional seconds in a separate integer column.

Well it's not handy for me to store data like that because i have to do
some summation/substraction with those values.. But thank you very much
for your reply, it was very helpful.


Reply With Quote
  #6  
Old   
zgb
 
Posts: n/a

Default Re: milliseconds in mySQL - 02-18-2008 , 04:38 PM



Troels Arvin wrote:
Quote:
On Mon, 18 Feb 2008 22:27:32 +0100, zgb wrote:
Is it possible to store the time in milliseconds format?

No. With MySQL, you will have to invent your own system for this, such as
storing the fractional seconds in a separate integer column.

Well it's not handy for me to store data like that because i have to do
some summation/substraction with those values.. But thank you very much
for your reply, it was very helpful.


Reply With Quote
  #7  
Old   
zgb
 
Posts: n/a

Default Re: milliseconds in mySQL - 02-18-2008 , 04:38 PM



Troels Arvin wrote:
Quote:
On Mon, 18 Feb 2008 22:27:32 +0100, zgb wrote:
Is it possible to store the time in milliseconds format?

No. With MySQL, you will have to invent your own system for this, such as
storing the fractional seconds in a separate integer column.

Well it's not handy for me to store data like that because i have to do
some summation/substraction with those values.. But thank you very much
for your reply, it was very helpful.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.