Link to home
Start Free TrialLog in
Avatar of peterslove53
peterslove53

asked on

Add or subtract time in SQL Server

I have a time in format 08:40
i ll like to add or subtract 60 minutes to that time in sql server

08:40 + sixty munites
08:40 - sixty munites
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
peterslove53:

Is your starting time (08:40) in a date or time format, or text?

AielloJ
Avatar of peterslove53
peterslove53

ASKER

time is just an int
>I have a time in format 08:40
>time is just an int
Explain for us how the value '08:40' can be assigned to an int data type.
its data type "Time"
peterslove53:

If it's type "time", then Jim Horn's initial response should do what you want.

AielloJ