Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to cast 00:00:01 varchar field to int in sql server

there are values

00:00:02<br />
00:00:05<br />
00:00:10


etc

i want to get the sum,so that i want to convert it to int



Please help
Posted
Updated 8-Feb-11 23:18pm
v2
Comments
Manas Bhardwaj 9-Feb-11 5:18am    
Leave alone the syntax in SQL. It does not make sense, what is the result you would expect?
Prerak Patel 9-Feb-11 5:18am    
It is not the integer format? You want to consider only last 2 digits?
kishore Rajendran 9-Feb-11 5:28am    
its HH:MM:SS, i want to sum it

1 solution

Hi kishore Rajendran,

you can make a datetime object in your code and add the times.

Hopes this help,
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900