This topic is locked

Current Date In Field

2/4/2013 3:58:55 AM
ASPRunnerPro General questions
R
rob_by68 author

Hi to everybody,
i have a database in MS Access with one field displaying the current date using access built-in function.

I havo a couple of calculated fields based on that field.
The problem is that date won't change when database is displayed via ASP. To refresh the date, i have to

manually open MS Access Database and, at that point, current date is correctly displayed in ASP project.
Is there any way to change this behaviour obtaining the current date when displaying the database via ASP?

I tried to set the field with a default value equal to Datetime.now, but this adds time also, while i need

only to show current date and correct calculation based on that field.
Any suggestion or ideas?
Thank you very much.
Roberto

Italy

Sergey Kornilov admin 2/4/2013

Roberto,
in ASPRunnerPro you can use a default value.
You can use Now() as default value to insert date and time. You can use FormatDateTime(Now(),2) to display date only.
More info:

http://stackoverflow.com/questions/9003923/vbscript-how-can-i-format-date

R
rob_by68 author 2/5/2013

Thank you for the info, but i keep on having a wrong date returned to the database presented via ASP.
I'll give you a little more info. MS Access Database containing data needs to be used by some end user and

relevant data are presente via ASP. When i created the database, i inserted a routine that automatically runs

when database is opened and that sets a particular field (Current Data) to the current date. Until this, no

problem at all.
The problem arises if the database is not opened via MS Access and, basically, i need to update that field

to the value corresponding to the current date. When i open the database via ASP that field isn't automatically

updated. What i need to do is to update that field when i open the database via ASP.
I tried what you suggested, date appears in correct format but displays the value of the last date the database

hase benn opened via MS Access.
Any other suggestion?
Thank You very much.
Roberto

Italy

Sergey Kornilov admin 2/5/2013

Roberto,
this doesn't make much sense to me. If you gave a valid support contract 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. This way we can see what exactly is happening and help you find the right solution.