Forums
This topic is locked
Expire date?
Posted 22 Apr 2003 13:24:33
1
has voted
22 Apr 2003 13:24:33 Jelle-Jacob de Vries posted:
I have created a SQL statement that puls out today's records and the records of three months ahead. People can enter a start date and a end date for there records. If there's only a start date, the record will expire(not be shown) by that date. If the have enterd a end date, that date will then be the expire date.
My question is:
Does anybody have a suggestion, how to create 2 checkboxes(one for the start and one for the end-date) where people can choose there expire date? Do I have to modify my SQL or is it asp/vb scipt trick?
I hope it's not to confusing,
Thanks in advance.
Replies
Replied 22 Apr 2003 15:38:25
22 Apr 2003 15:38:25 Vince Baker replied:
not sure what you mean. can you try to explain again
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 22 Apr 2003 23:41:10
22 Apr 2003 23:41:10 Jelle-Jacob de Vries replied:
Well, I've made a form on which people can enter f.e. a seminar with all needed information like start-date, end-date, time, location etc etc.
I want to give users the option to choose the expire date for a specific record(seminar or something else)
If a user enters a startdate, that date will automaticly be the expire date but if the also enter a end-date I want to give them the option to choose between the start or end-date to expire on.
I'm querying my records with the following sql-statement;
SELECT *
FROM Groene_Agenda
WHERE (((Groene_Agenda.verwijder_datum)>=Date() And (Groene_Agenda.verwijder_datum)<=DateAdd('m',3,Date())) AND (([Groene_Agenda.cat_id])=MMColParam)) OR (((Groene_Agenda.verwijder_datum1)<=DateAdd('m',3,Date())) AND (([Groene_Agenda.cat_id])=MMColParam) AND ((Groene_Agenda.verwijder_datum1)>=Date()))
ORDER BY Groene_Agenda.van_datum
Groene_Agenda.verwijder_datum is representing the start-date
Groene_Agenda.verwijder_datum1 is representing the end-date
As you've seen the records do not really expire the just dont be queried from the database.
I hope I've made it clear to you. Thanks for your help.
I want to give users the option to choose the expire date for a specific record(seminar or something else)
If a user enters a startdate, that date will automaticly be the expire date but if the also enter a end-date I want to give them the option to choose between the start or end-date to expire on.
I'm querying my records with the following sql-statement;
SELECT *
FROM Groene_Agenda
WHERE (((Groene_Agenda.verwijder_datum)>=Date() And (Groene_Agenda.verwijder_datum)<=DateAdd('m',3,Date())) AND (([Groene_Agenda.cat_id])=MMColParam)) OR (((Groene_Agenda.verwijder_datum1)<=DateAdd('m',3,Date())) AND (([Groene_Agenda.cat_id])=MMColParam) AND ((Groene_Agenda.verwijder_datum1)>=Date()))
ORDER BY Groene_Agenda.van_datum
Groene_Agenda.verwijder_datum is representing the start-date
Groene_Agenda.verwijder_datum1 is representing the end-date
As you've seen the records do not really expire the just dont be queried from the database.
I hope I've made it clear to you. Thanks for your help.
Replied 23 Apr 2003 09:15:13
23 Apr 2003 09:15:13 Vince Baker replied:
As you cannot have an if statement in the sql (unfortunately) the if statement would have to be done afterwards on the page. Alternatively, have a middle page that checks to see if the end date is complete.
This way, you can have a single variable set that is passed onto your result page.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
This way, you can have a single variable set that is passed onto your result page.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting