Jump to content

Compare date


ari_aaron

Recommended Posts

[!--quoteo(post=363012:date=Apr 9 2006, 11:28 AM:name=ari_aaron)--][div class=\'quotetop\']QUOTE(ari_aaron @ Apr 9 2006, 11:28 AM) [snapback]363012[/snapback][/div][div class=\'quotemain\'][!--quotec--]
How can I make a script that selects a row in an SQL table where a date(stored in date(yyyymmdd)) is today.

Or, even better, check if now is after sunset of the previous day, and before sunset of that day.
[/quote]
Now is always after sunset yesterday, because now is today.

Would you care to be more specific as to what you want. As to when 'sunset' occurs, php is a scripting language, not 'magic'. I suspect you'll have to arbitrarily assign a value of 'sunset' (possible depending on today's month).

Are these dates as determined by your server, determined by your user's local time/date, GMT dates, etc?
[code]$today = date("Ymd"); // yyyymmdd on your server[/code]
Link to comment
Share on other sites

I'm sorry, but in the php manuel ([a href=\"http://ca3.php.net/manual/en/function.date-sunset.php\" target=\"_blank\"]http://ca3.php.net/manual/en/function.date-sunset.php[/a]) it gives a function date_sunset(). I wanted to know how else you could get the longituse/latitude locations.

Can you help with the first question?
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.