I am trying to get teh current time as a unix timestamp from my MSSQL database.
In Mysql I could say something like:
SELECT id,
caregiver_id,
client_id,
week_no,
CURTIME() as Synch_Time
FROM dbo.Visits
But THERE is no CURTIME() function in T-SQL
Does anyone know of a solution?
Thanks
Kevin
You can use getdate() and do some calculations described here. http://mysql.databases.aspfaq.com/how-do-i-convert-a-sql-server-datetime-value-to-a-unix-timestamp.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With