DB Setup Filtering current date between two dates in List
I do have a csv list with several fields in there.
Example:
category;GTIN;price;startdate;enddate;header;
SiS;9120012345678;24;12.06.2023;23.09.2023;Specialmix;
In the Database Setup in Bartender Designer I do need to filter the data according to the following conditions:
currentdate is same or higher than startdate
AND
currentdate is same or lower than enddate
How do I get the currentdate Value in the same format as the austrian date format which is dd.MM.yyyy.
This value needs to be available in the db Setup for the filter setting.
-
Peter Thane
★ BarTender Hero ★
Try this for your filter setup:
You can adjust the way the data format is displayed on your label via the Properties of the field and from the Type, as when you set this to Date the display options will appear.
Please not for your filter you can actually use different separators for the date and still the look up works, below I have used dd.mm.yyyy and dd/mm/yyyy and the results are shown below
This is by raw data
code,exp
1111,11.05.24
2222,01.01.25
3333,22.9.23
4444,9.9.26
5555,22/9/240 -
Christian Hauser
★ BarTender Hero ★
Hi. Thank's for the answer.
But this is not working for my request.
I do not want to use a field entry popup shown above.We do have a Result list from which the users can choose a line.
To filter this result list already before showing them to the user, I need to have a solution for using the current date as predefined Filter Argument (instead of the "?QueryPrompt1" in the Database Setup > Filter Window in the first picture. This should be a function or some kind of Variable I can use to check against the csv entry.Is there any kind of command to use like "now()" or "getDate()" or something else I can use in this Filter definition?
Edit: The date in the csv list is a kind of "activation date" and an "end date" for a barcode validity check. If the date is lower than the activation date or higher than the "end date", the barcode is not shown to the user in the filtered select list for printing.
0 -
Peter Thane
★ BarTender Hero ★
Edit query prompt 1 in the filter to make it Read Only and Exclude Control from Tab Order, then click the More Options button and select VB script and in the VB box type Value = Now() and click Close, ignoring the error.
On the Data Entry Form add an input linked to query prompt 1 but drag it off the side of the display screen so it wont be shown at print time (I have dragged mine to the bottom corner instead in the image below). I have also added a new record with a date set prior to 18/9/23 (ie today) to test
and this gives me
0
Iniciar sesión para dejar un comentario.
Comentarios
3 comentarios