October 11, 2012 at 11:00 pm
Hi,
So I need to write a query that will if something was modified in the last 15 min. The problem is that the data is stored as UCT time and I am WST so UST +8
ie so if I had to make a change at say 2pm it would show up in the database as taking place at 6am when I did a straight select from that table...
So how do I select x, y, z, from T where z <= 15
z is in uct format and 15 is equal to current time - 15 min
Hope this helps...
Ford Fairlane
Rock and Roll Detective
October 11, 2012 at 11:35 pm
use select getutctime() , it will give you GST time then use select dateadd() function to get required reuslt
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
October 14, 2012 at 5:03 pm
Dont you mean GETUTCDATE() ?? I have tried using that but then I still need to add 8 hours to it and then do a time comparision for the last 15 min all within a where clause.... and that is where I am getting lost...to many identifiers
Hope this helps...
Ford Fairlane
Rock and Roll Detective
October 14, 2012 at 11:08 pm
Ford Fairlane (10/14/2012)
I still need to add 8 hours to it and then do a time comparision for the last 15 min all within a where clause
Yes i have to do this
Ford Fairlane (10/14/2012)
and that is where I am getting lost...to many identifiers
Confusion ?? What ??
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
October 14, 2012 at 11:49 pm
Bhuvnesh - I have no idea what your last post ment if anything......
I appreciate you help but I dont understand a thing you have said....
Hope this helps...
Ford Fairlane
Rock and Roll Detective
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply