I have a datawindow where I have a date field. I want to specify an initial value into that date field when a row is retrieved from the database. From the Column Specification
, I want to set the initial date value of that field to current date. Is there any keyword or function which I can write in the Initial Value
field?
Asked
Active
Viewed 6,689 times
1

MD Sayem Ahmed
- 28,628
- 27
- 111
- 178
2 Answers
6
As a general rule, it's a bad idea to use the client's clock. It could be set to 1986 for all you know. Select the server's date in a hidden field and copy it to the table column. Another solution is to let the client put whatever it thinks the date/time is in the column (as in Colin's answer), then update it to server time in a post-insert trigger.

Hugh Brackett
- 2,706
- 14
- 21
2
today()
should do it.
As Hugh says, you don't want to trust the client machine's clock for accurate time, but this is fine to initialize a data entry field to a sensible default.

Colin Pickard
- 45,724
- 13
- 98
- 148