Re: how to conver nvarchar with value like(12.23) to time (12:23)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Indra Timilsina (itimilsina_at_savannaenergy.com)
Date: 11/09/04


Date: Tue, 09 Nov 2004 12:10:27 -0800

Hi David,

I try as you mentioned, but still I am receiving this error.

"Arithmetic overflow error converting expression to data type datetime"

INSERT INTO TourItemsTemp (FromTime, ToTime, TimeCodeID,
TourItemDescription)
select Cast(replace(Col004, '.', ':') as datetime),
replace(Col005,'.',':'), Col007, Col008 FROM UploadTour
where Col001=N'TTL160';

Thanks.

Indra.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • RE: Convert/Cast a Decimal to DateTime
    ... I'm not sure what I'm missing, thx. ... >> Arithmetic overflow error converting expression to data type datetime. ...
    (microsoft.public.sqlserver.programming)
  • RE: finding offending data
    ... >> I am running the query below against a very large database to convert ... >> Arithmetic overflow error converting expression to data type datetime. ...
    (microsoft.public.sqlserver.programming)