Date problems

chrisd49

Registered User.
Local time
Today, 06:54
Joined
Oct 25, 2006
Messages
25
Hi All
I am having problems with querying and displaying dates.

My first problem... I have a table named Tasks which has a date entered by two drop down lists for Month and Year. I need to be able to count the number of tasks that fall either before or after the current date, ie they are either overdue or due. The tasks are identified by site.

My second problem is that some of the tasks are recurring and I would like these to be autogenerated into the list of tasks for that site.

Any assistance would be much appreciated.

ChrisD
 
Question 1: A date does not only consist of a month and year. Are you storing your month and year in separate fields? What is the data type of these fields?
Question 2: Are these reoccurring tasks flagged so they can be identified as such?
 
Date Problems

Hi FoFa
The date is held in two seperate fields which are populated by lookups from two seperate tables. Should I use a different method to get Month Year data? Would this make it easier to use the DateDiff function?

And now that you mentioned it no the recurring tasks are not flagged, obviously if they were it would be easier to add the necessary interval ie 1 month, 3 months etc to the due date of the task

Any further help greatly appreciated.

ChrisD
 
Well you can pull the month and year from the current date, then compare to your stored month and year.
CurrentMonth = MONTH(Date())
CurrentYear = YEAR(Date())
Setting a reoccurring event is a simple add to the month/year, but you have to be able to identify which you need to do those to.
 

Users who are viewing this thread

Back
Top Bottom