Lounge of Tomorrow

€uromeinke, FEJ. and Ghoulish Delight RULE!!! NA abides.  


Go Back   Lounge of Tomorrow > A.S.C.O.T > Egg Head
Swank Swag
FAQ Members List Calendar Today's Posts Clear Unread

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-25-2010, 01:01 PM   #1
Moonliner
8/30/14 - Disneyland -10k or Bust.
 
Moonliner's Avatar
 
Join Date: Jan 2005
Posts: 9,022
Moonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of cool
Send a message via AIM to Moonliner Send a message via MSN to Moonliner Send a message via Yahoo to Moonliner
Any SQL Guru's out there?

I'm spacing on this one....

I have a SQL table with the time stored as the number of milliseconds since midnight (I think). How do I get from 5,677,528 back to 11:16am?
__________________
- Taking it one step at a time.
Moonliner is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 01:15 PM   #2
Tref
Not Tref
 
Tref's Avatar
 
Join Date: Jan 2005
Posts: 2,188
Tref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of coolTref is the epitome of cool
Send a message via AIM to Tref Send a message via Yahoo to Tref
Quote:
Originally Posted by Moonliner View Post
I'm spacing on this one....

I have a SQL table with the time stored as the number of milliseconds since midnight (I think). How do I get from 5,677,528 back to 11:16am?
I would love to help you, but, hell, I wish I could get back to 11:16 am! Those were so some good times.
__________________
Tref3.0


Listen in aural 3-D to Pop's muzak!
(New songs added semi-bi-daily)



j & j


Did you know that Emas eht yltcaxe is exactly the same spelled backwards?!
Tref is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 02:10 PM   #3
Disneyphile
SQUIRREL!
 
Disneyphile's Avatar
 
Join Date: Jan 2005
Location: On the curbside.
Posts: 5,098
Disneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of coolDisneyphile is the epitome of cool
Well, let me pry open a box that's been stored in the back of my brain for 4 years. I recall it being a very simple code fix...

I think it's something like dbo.FormatDateTime('SHORTDATE')

Lemme know if that sets you on the right track, and if not, I'll open one of my old tables.
Disneyphile is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 03:00 PM   #4
Capt Jack
check your head
 
Capt Jack's Avatar
 
Join Date: Oct 2005
Posts: 4,174
Capt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of coolCapt Jack is the epitome of cool
Quote:
Originally Posted by Moonliner View Post
I'm spacing on this one....

I have a SQL table with the time stored as the number of milliseconds since midnight (I think).
Id be most curious as to why such a thing would be done to begin with. Is this a table you built?
__________________


a clear conscience is a sure sign of a fuzzy memory

Capt Jack is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 03:32 PM   #5
BarTopDancer
Prepping...
 
BarTopDancer's Avatar
 
Join Date: Jan 2005
Location: Here, there, everywhere
Posts: 11,405
BarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of coolBarTopDancer is the epitome of cool
select * from dbo.coworkers
where coworkers = 'helpful'


2 results returned.
__________________
Spork is the new MacGyver



BarTopDancer is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 04:20 PM   #6
Moonliner
8/30/14 - Disneyland -10k or Bust.
 
Moonliner's Avatar
 
Join Date: Jan 2005
Posts: 9,022
Moonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of coolMoonliner is the epitome of cool
Send a message via AIM to Moonliner Send a message via MSN to Moonliner Send a message via Yahoo to Moonliner
Quote:
Originally Posted by Capt Jack View Post
Is this a table you built?
Oh hell no! It's a commercial product from a company that ought to know better.

I found what I needed. After checking my math I figured out the values where 100's of a second not milliseconds. However SQL does not seem to have a centisecond option so I ended up converting to milliseconds anyways.


rtrim(substring(Convert(varchar,dateadd(ms,time*10 ,'2010-10-2'),13),13,5))

did the trick.
__________________
- Taking it one step at a time.
Moonliner is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 04:56 PM   #7
Cadaverous Pallor
ohhhh baby
 
Cadaverous Pallor's Avatar
 
Join Date: Jan 2005
Location: Parental Bliss
Posts: 12,364
Cadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of coolCadaverous Pallor is the epitome of cool
Send a message via AIM to Cadaverous Pallor Send a message via Yahoo to Cadaverous Pallor
My husband must be in meetings all day.
__________________
The second star to the right
shines in the night for you
Cadaverous Pallor is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 06:33 PM   #8
Ghoulish Delight
I Floop the Pig
 
Ghoulish Delight's Avatar
 
Join Date: Jan 2005
Location: Alternative Swankstyle
Posts: 19,348
Ghoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of coolGhoulish Delight is the epitome of cool
Send a message via AIM to Ghoulish Delight Send a message via Yahoo to Ghoulish Delight
I could have done the math, but still don't have enough stick time with sql to have the syntax down without a lot of reference/trial and error. And I knew Moonie could do the math, so the syntax was the important part.
__________________
'He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.'
-TJ

Ghoulish Delight is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 07:19 PM   #9
Kevy Baby
Chowder Head
 
Kevy Baby's Avatar
 
Join Date: Jan 2005
Location: Yes
Posts: 18,500
Kevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of coolKevy Baby is the epitome of cool
Quote:
Originally Posted by Moonliner View Post
Any SQL Guru's out there?
Yes, I am sure that there are a lot of them.
__________________
The thing about quotes on the internet is that you cannot verify their validity.
- Abraham Lincoln
Kevy Baby is offline   Submit to Quotes Reply With Quote
Old 10-25-2010, 07:55 PM   #10
Alex
.
 
Join Date: Feb 2005
Posts: 13,354
Alex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of coolAlex is the epitome of cool
Quote:
Originally Posted by Ghoulish Delight View Post
I could have done the math, but still don't have enough stick time with sql to have the syntax down without a lot of reference/trial and error. And I knew Moonie could do the math, so the syntax was the important part.
Same here. Started to respond with math and said "no, that can't be the problem."
Alex is offline   Submit to Quotes Reply With Quote
Reply



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
Forum Jump


All times are GMT -7. The time now is 04:03 PM.


Lunarpages.com Web Hosting

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.