Hi Guys
I want to get the sql servers current time and then I want to increment the time by 30 mintues. Your assistence will be appreciated. So the query output should be current time + 30 mintues. The format is as below.
YYYY-MM-DD HH:MI:SS(24h)
Hi Guys
I want to get the sql servers current time and then I want to increment the time by 30 mintues. Your assistence will be appreciated. So the query output should be current time + 30 mintues. The format is as below.
YYYY-MM-DD HH:MI:SS(24h)
Naturally, Jonlee has the best answer of course. But just for the sake of completeness, remember that adding 1 to a date adds 1 day(24 hours). So, if you want to add a half hour, you can add 1/48 to a date. So,
select convert(varchar, getdate() + 1.0/48.0, 120)
Should give you what you want. Of course, Jonlee's answer is probably the way to go in real life, but I for one like having options.
No one has followed this question yet.