Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to use a button to make my selection, I only want my button to return data for only the things that has happen today using this date format: 2012/02/29 10:06:00 AM,
this is the expresion I was trying to use but its not working
if(ReportType = 'Daily', Test_Date = Timestamp#(Today('2012/02/29 10:06:00 AM', 'YYYY/MM/DD hh:mm:ss'))
Hi,
You need to add the AM/PM to the format:
if(ReportType = 'Daily', Test_Date = Date(Today(), 'YYYY/MM/DD hh:mm:ss TT'))
Hope that helps.
Miguel
Hi Miguel
I used the same expresion as u suggested, but now it doesnt return the results according to the Daily filter I specified.
Regards
Edzi
Hi Edzi,
Does the Date() function above return as you expected, and that the format is the same that the field Test_Date has? Apart from that, where are you using that expression? Is that an action? I should have asked before.
Hope that helps.
Miguel
Hi Miguel
Yes the Date function retuns the corect values on theTest_Date field, but now the problem is that it doesnt return anything if I use the filter "Daily". and I am using the Exprestion on the expresion tab of the table chart that Im using to disply the results, I added the action "Set Variable" on the button that passes through the variable Report type to Table chart.
Kind regards
Edzi
Hi Edzi,
I'm afraid I'm missing something. You original question was about a button to make a selection in a field. Did you try to create a button, and in its properties set a new Action, Selection, Select in Field, Test_Date and
=Date(Today(), 'YYYY/MM/DD hh:mm:ss TT')
as the Search String?
If this is not what you are after, would you mind to upload some dummy example so we can check further?
Hope that helps.
Miguel
Hi Miguel
That’s exactly what I am trying to do, The problem only came up when changing the date formats, because when I am using the YYYY/MM/DD date format it doesn’t give me a problem. Please see the attached dummy model I am using!
Kind Regards
Edzisani Tshivhase
Systems Analyst | Software Developer
<http://www.fourier.co.za/>Fourier Approach (Pty) Ltd
Tel: +27 (0) 12 667 3232
Fax: +27 (0) 12 667 3244
Cell: +27 (0) 73 762 9982
Email: tshivhasee@fourier.co.za
Website: http://www.fourier.co.za<http://www.fourier.co.za/
Hi Edzi,
Note that the function above returns a complete timestamp, and you may not have records with that timestamp. So I'd create a button with an action Select in Field Test_Date1, and the following as Search String:
=Date(Today(), 'YYYY/MM/DD') & '*'
Hope that helps.
Miguel