ASPDEV
asked on
Update record in SQL Table
Hello Experts,
I need to update a Time field in a table its is nvarchar field.
TimeStamp
ID date Time
-- ------ -----
1 01/01/2011 10:00
2 01/01/2011 10:57
3 01/01/2011 11:30
All the fields in the Timestamp table are Nvarchar, I need to update Time field with PLUS 1. For instance in the time field I have a string data "10:00" , need to update( +1) . It should be 11:00. And rest of them too 11:57, 12:30,..
Thanks.
I need to update a Time field in a table its is nvarchar field.
TimeStamp
ID date Time
-- ------ -----
1 01/01/2011 10:00
2 01/01/2011 10:57
3 01/01/2011 11:30
All the fields in the Timestamp table are Nvarchar, I need to update Time field with PLUS 1. For instance in the time field I have a string data "10:00" , need to update( +1) . It should be 11:00. And rest of them too 11:57, 12:30,..
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are most Welcome
As a passing observation, storing dates and/or times as characters instead of actual date or time datatypes opens up your database to the possibility of having to deal with invalid dates and/or times. There is a reaseon that Date, Time, and DateTime datatypes exist, just as there is a reason that the INTEGER datatype exists. ;-)
ASKER
Thanks for the Awesome post!.