... but for a project I have to use the processIf you really need to use that exact process, you can't use current_timestamp or 'NOW'.
...
Only that now populates the value with the date of the client and not of the server. How can I solve the problem?
Only that now populates the value with the date of the client and not of the server. How can I solve the problem?Is the date of the client so much different from that of the server ????
Is the date of the client so much different from that of the server ????In theory, no, but it can happen.
Hi guys, I have a very trivial question about valuing a date in a database field. I work a lot with queries and know that with firebird when I want to set the date to the current date I just need to use the current_timestamp but for a project I have to use the processAs a matter of fact, this is a problem for a sysadmin and not for software developers...
MyQuery.Edit;
MyQuery.FieldByName('myfield').AsDateTime := now;
MyQuery.Post;
Only that now populates the value with the date of the client and not of the server. How can I solve the problem?
You have two options.+1
Change the INSERT to use current_timestamp or 'NOW'.
Or retrieve current_timestamp with a separate SQL-statement from the server and fill it in with the AsDataTime.