>Very stupid question, but can you simply use SELECT GETDATE() ?
What I've always done:
"SELECTgetdate() as datetime"
if using time from sqlserver or a query to a time server if that is turned on and configured.
all datetime loggings are set to the sqlserver datetime (or the time server) and just prior to doing so, check a global setting that determines how far out of sync the workstation is allowed to get and if it is > than the maximum allowed, notify the user to contact their system administrator or log it if no user interface
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"