Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Add Minutes value to a DateTime data by using  SQL

Posted on 2007-08-05
Medium Priority
Last Modified: 2008-01-09
  I am writing a SQL procdure which need to only add minutes value in a DateTime data. For example
Day1 = '8/5/2007 12:00pm'
I want to add 90 minutes on it to get Day2 = '8/5/2007 13:30pm'

How can I do that?
Thanks a lot,
Question by:Jinghui Li
  • 2
LVL 25

Assisted Solution

clockwatcher earned 1000 total points
ID: 19635607
Which database are you using?  In SQL server, use DATEADD.


select DATEADD(minutes, 90, '8/5/2007 12:00pm')
LVL 25

Accepted Solution

clockwatcher earned 1000 total points
ID: 19635608
select DATEADD(minute, 90, '8/5/2007 12:00pm')

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question