Re: Convert float time to date/time?
From: Jacco Schalkwijk (jacco.please.reply_at_to.newsgroups.mvps.org.invalid)
Date: 10/14/04
- Next message: Keith Kratochvil: "Re: Audit of sql server"
- Previous message: Alejandro Mesa: "RE: Access SQL to T-SQL"
- In reply to: Renae: "Convert float time to date/time?"
- Next in thread: Keith Kratochvil: "Re: Convert float time to date/time?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 14 Oct 2004 17:15:06 +0100
SELECT DATEADD(hh, CONVERT(int, [time])/100, (DATEADD(mi, CONVERT(int,
[time]) %100, [date]))
-- Jacco Schalkwijk SQL Server MVP "Renae" <hilary321@yahoo.com> wrote in message news:bb43f5e8.0410140803.750a6077@posting.google.com... >I have two columns that I need to create a datetime column from in SQL > Server 2000. > > The first is a float that represents military time. The second is a > date field. They both are being imported from Oracle. > > So, date: 1/12/2003 time: 1223 should become: 1/12/2003 12:23 PM. > > Any ideas? > > Renae > hilary321@yahoo.com
- Next message: Keith Kratochvil: "Re: Audit of sql server"
- Previous message: Alejandro Mesa: "RE: Access SQL to T-SQL"
- In reply to: Renae: "Convert float time to date/time?"
- Next in thread: Keith Kratochvil: "Re: Convert float time to date/time?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|