Wot is it that u r going to do by convertig now to milliseconds? u just cant convert a date in to milliseconds.. may be u r lookin for a time interval?? if yes, tell us, may be we can help... All the Best
Praveen Menon
pcmin@rediffmail.com
I think you will have to use a stored procedure to get what you want because I belive that the GETDATE() SQL function will only return down to seconds to VB. I think that you will have to cast the value returned to a string to get the milliseconds (Could be wrong).
Nah, I'll convert it to an integer before I get the result set and return the integer -- which will be my milliseconds. Either that or return both the minutes and milliseconds as integers from SQL.
"PC" clocks are not accurate to the millisecond level (actually they are not normally accurate even to the second in many situations). Setting / displaying or virtually ANY use of the internal 'clock' processes is just gilding the already wilted lilly. If these is some REALLY REALLY REALLY necessary function which actually benefits from timing at that level, you will need to have a third party add-on which includes an independent 'clock' - and use a GREAT DEAL OF CARE in obtaining the clock information for the timing functions. After all, Win is "MULTITASKING", so your timing may easily be affected by other processes.
I have seen situations where servers on the same networks were synchronized on a daily basis and ended the day with several seconds difference in the server clocks - even on 'slow days'. On my current system (just four older machines on a peer-to-peer network at home), I generally get an offset of at least a minute per week in my clock between the two or three running computers.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.