Jump to content

How do I get the last occurrence of a date?


Moron

Recommended Posts

[quote author=Caesar link=topic=104236.msg415676#msg415676 date=1155579414]
Kinda vague.

Where do you want to get this last occurance? From a database? What type of database? MySQL? Can you post the current code you have? What format are these dates stored as?
[/quote]

Sorry I wasn't more clear. No, I don't mean the last occurrence with data. I mean the last time that date happened. For example, the last time it happened was July 1, [b]2006[/b]. If I had ran this program back in May or whatnot, then it would show the last occurrence as July 1, [b]2005[/b], and so on.
Link to comment
Share on other sites

You will need to store that information in order to make a reference to the last time the script was last accessed. If that is indeed your goal. Still unclear as to what it is you're asking. Regardless of what you're asking though, you will need to store data to make a reference to it, or compare it.
Link to comment
Share on other sites

[quote author=Caesar link=topic=104236.msg415687#msg415687 date=1155581146]
You will need to store that information in order to make a reference to the last time the script was last accessed. If that is indeed your goal. Still unclear as to what it is you're asking. Regardless of what you're asking though, you will need to store data to make a reference to it, or compare it.
[/quote]

Okay, I guess I'm not expressing myself very well. Sorry, but this is also a bit confusing to me. It's actually very simple. What year was the last occurrence of July 1? That's it. As of right now, the answer would be July 1, 2006. This time next year, the code will show that the last occurrence was July 1, 2007, and so on. Our fiscal year begins July 1, but I need it to be Year-aware.

Make sense?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.