Hi, Expert
How Do I Add Time with integer value in MSSQL ??
For Example: 07:00:50 + 20 = 07:01:10
Note: 20 is in second
Thanks in advance
Check out the DATEADD function in BOL (documentation).|||Hi,
You can play with DATEADD function for your question, for example:
SELECT dateadd(s, 20, getdate())
this one will add 20 seconds to now.
You can look up this function from Books Online to find more information. By the way, in SQL Server there is datatime data type, but not time or date only data type.
No comments:
Post a Comment