View Full Version : Insert Dates into Table


ajb_1976
03-13-2006, 04:54 AM
Hello,
I have a table with 2 fields - WeekID(autonumber) and WDATE(date/time). What I want to be able to do is to enter a value for the first date and then have the next 25 entries automatically entered. Each entry is to be 1 week greater than the previous entry. Ultimately giving me a list of dates, numbered 1-26, incremented weekly.
I assume the DATEADD function is to be used but i cannot determine how.
Any help / pointers is greatly appreciated.
Thanks

Pat Hartman
03-16-2006, 12:55 PM
Rather than generating 26 records in advance, you should run the process each week and generate the current record only.

ajb_1976
03-17-2006, 03:51 AM
Thanks for the reply.
In the end i resorted to creating the recordset in excel and linking my db to the spreadsheet.
cheers