Forum Moderators: open
That is, I'm using a database table field where you can enter dates in format DD/MM/YYYY. One date (or no date) for each Point of Sale.
Now what has to happen is that the text should ONLY appear for those items which
- A: have a date (older POS will have an empty date field)
- B: have been entered less than three months before the current date (on the server)
So I was thinking to use an If construct, similar to:
IF
less than three months have passed between the date of entry (in the database)
THEN
show the text
Else
show nothing
However, I don't know a method I could use for manipulating these dates and calculating how many months (or: 90 days, does not need to be so strict) are between the two dates. Is there something that can convert a date to a number or do a comparison so I can compare and check how many days/months between them?
[edited by: Darkelve at 10:41 am (utc) on May 10, 2007]