Rolling Dates Forward

  • Thread starter Thread starter Bryan Harrington
  • Start date Start date
B

Bryan Harrington

Ok.. so I've got this web based application running with an Access 2k
database in the back end. It's a demo system that has dates in the tables.
Does anyone have a good suggestion on how to programatically roll the dates
forward by one date every day?

Thanks!
 
To always store the current data in the table, set the default value to
'date()' (No quotes)

If you want to update existing data you'll need to run a query:

The following will update ALL records...
UPDATE TABLENAME SET FIELD NAME = Date()

Or add some criteria to update only certain records...
UPDATE TABLENAME SET FIELD NAME = Date() WHERE MYCOLUMNNAME > 1

Hope that helps.
 
Thanks Simon.. right idea.. but not quite.

I have data in the table(s) already.. I want to be able to programatically
roll the dates forward by a day. The web based system automatically does
aging based on dates, but for the demo we'd like to always have a constant.
 
OK.. sometimes you need to get up and walk away for a minute..

Thanks Simon.. with a little more brain power I figured it out.

UPDATE a_action SET a_action.action_date =
DateAdd("d",1,[a_action].[action_date]), a_action.fu_date =
DateAdd("d",1,[a_action].[fu_date]);
 
Back
Top