|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 1:37 AM
Points: 1,120,
Visits: 239
|
|
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

|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
use select getutctime() , it will give you GST time then use select dateadd() function to get required reuslt
-------Bhuvnesh---------- While 1 = 1 (Learning SQL....) Click to get fast response of your post
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 1:37 AM
Points: 1,120,
Visits: 239
|
|
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

|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
|
|
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---------- While 1 = 1 (Learning SQL....) Click to get fast response of your post
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 1:37 AM
Points: 1,120,
Visits: 239
|
|
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

|
|
|
|