Windows Timestamp

Hi experts

I am trying to do some time calculations and I am using windows server 2003. I tried using the following statement below but it didn't work as it asks for unix timestamp, how can I change it to work with windows timestamp

UPDATE MyTable SET LockField=0 WHERE LockField<time(CURTIME())-3600;

Thanks
LVL 9
syedasimmeesaqAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hernst42Commented:
Which type is the field  LockField in the database?

There are also functions to use unix-timstamp in the database: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_unix-timestamp
0
syedasimmeesaqAuthor Commented:
lockfield is text field

Thanks
0
hernst42Commented:
Can you prive information how the content of the column lockField look like e.g 2007-01-01 1:1:1 or something like 1223432432 ?
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

syedasimmeesaqAuthor Commented:
hernst42 thanks for your reply. The contents are in this format
2008-01-29 14:17:27

so this has the year, month and date and then time is 2;17 pm which is represented by I guess military time, which is ok.
Hope that helps
thanks
0
hernst42Commented:
In this case you can do the following:

UPDATE MyTable SET LockField=0 WHERE LockField < NOW() - INTERVAL 1 HOUR
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
syedasimmeesaqAuthor Commented:
this one gives me a blank page
Thanks
0
syedasimmeesaqAuthor Commented:
did this
UPDATE MyTable SET LockField=0 WHERE LockField < NOW() - 300;
but when I run the query, it sets up the field to 0 right away even if it had been only 5 second.

It is suppose to wait for 10 minutes time as the lock field has this value
date('Y-m-d H:i:s', gmmktime()) in this form 2008-01-30 16:43:49

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.