Dates query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rp
Forum Newbie
Posts: 21
Joined: Wed Nov 24, 2004 5:49 am

Dates query

Post by rp »

Hi folks

I hope this one is "simple" but again this fool cant manage it (properly)

I have 2 fields in the DB - both DATE format. Named: start and end

What I am looking for is the sql that allows the user the select specific periods e.g start date of 2004-10-10 end date 2004-12-31 only problem is that these 2 dates may not actually be dates in the relevant DB fileds.
so it going to be something like 'WHERE start> and end<' or similar.

Mark you "other" alternatives may be considered but the start and end represent budget periods that may not have a fixed time span.

Lookingforwrd to some help and as always, much appreciated. thanks
User avatar
pedrokas
Forum Commoner
Posts: 32
Joined: Thu Jan 15, 2004 10:53 am
Location: Lisboa, Portugal

Post by pedrokas »

not actually be dates ???

what u mean? truncated dates?
rp
Forum Newbie
Posts: 21
Joined: Wed Nov 24, 2004 5:49 am

Just to clarify

Post by rp »

"actually be dates" (from my post) means actual dates in the DB fields the fields are all formatted yyyy-mm-dd
Post Reply