This topic is locked

Adding records with default Date values

7/19/2013 8:36:29 AM
ASPRunnerPro General questions
G
gagsoft author

I have a table with various date fields.

It occurred to me that when imposing the following on date fields no records can be added(The add button does not work):

  1. Setting the default date - Date()
  2. Making the field read only

    I was wondering if this could be a bug, because when removing the above settings (Making it a plain date field), it works.
    Any pointers would be appreciated.
    Thanks,

    Peter G

admin 7/22/2013

Readonly field with with default value should work.
If for any reason it doesn't work for you post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. We would also need to know which table and page this issue appears on.

G
georgeb 8/9/2013

I think asp uses now() not date()?

T
Tim 8/22/2013

I've always used "Now()" but just today I changed one of my apps to use "Date()" as the default (because I wanted date only - not date/time) and it worked fine. It was not a read only field, however.
Just my observation. I'm using 7.2.

G
gonzalosb 10/10/2013

if you wan only date you need to use (date) not date(), this format only works for Now() how gives you date AND time.

if need to be "readonly" add (date) on "readonly" section.
in case you need only time should be use (time) instead of (date)
hope it helps.