Search by date range
4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 15, 2009 (RSS)
I have a field where dates and times are stored and I'd like to be able to display a list of records withing a chosen date range.
I'm not sure how to use the search functions fieldname_year, _month and _day in the search function. I have a java app that allows the user to select a start and end date from a calendar in the mm/dd/yyyy format that I would like to pass to the searchviewer.
Any suggestions?
TIA
Eric
I'm not sure how to use the search functions fieldname_year, _month and _day in the search function. I have a java app that allows the user to select a start and end date from a calendar in the mm/dd/yyyy format that I would like to pass to the searchviewer.
Any suggestions?
TIA
Eric
Re: [eduran582] Search by date range
By Dave - September 14, 2009
Hi Eric,
If you can get your input dates into MySQL format (like this: YYYY-MM-DD HH:MM:SS) then you should be able to use the _min and _max search functions.
If you want to just search on date and not time just enter zeros for the hour, min and second.
Let me know how it works out for you.
If you can get your input dates into MySQL format (like this: YYYY-MM-DD HH:MM:SS) then you should be able to use the _min and _max search functions.
If you want to just search on date and not time just enter zeros for the hour, min and second.
Let me know how it works out for you.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com
Re: [Dave] Search by date range
Thanks for replying, Dave!
Will it make any difference if the db input uses 24 hour time? Meaning, should I use HHMM for the time value (YYYY-MM-DD HHMM)?
Eric
Will it make any difference if the db input uses 24 hour time? Meaning, should I use HHMM for the time value (YYYY-MM-DD HHMM)?
Eric
Re: [eduran582] Search by date range
By Dave - September 15, 2009
Yes, it should use 24 hour time. In this format: YYYY-MM-DD HH:MM:SS
Let me know how it goes!
Let me know how it goes!
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com