April 17, 2019 at 1:07 pm
Hi,
I have a table name 'Time Reported' and the format of the data is :
1899-12-30 09:12:32.000
There are 29602 rows of data, this was imported from a old Access database i would like to run a SQL query to remove the 1899-12-30 & the .000 and leave the 09:12:32
Can anyone assist with a SQL query that will achive this.
Cheers James
April 17, 2019 at 1:24 pm
DECLARE @TimeReported datetime = '1899-12-30 09:12:32.000';
DECLARE @NewTime time;
SET @NewTime = CAST(@TimeReported AS time);
SELECT @NewTime;
John
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy