Dashboard has variable that shows date in desc order from postgres.
As days pass by, the dropdown default date still shows as the last saved date.
How can I make sure that when user picks the dashboard, it shows the report for the most recent date in the variable dropdown?
NOTE: The date may not be current_date. It's just the first date in the query result that the report should open to.
Edit dashboard json manually (there is no UI option for that) and remove definition of default value for that particular dashboard variable. Grafana will use first result value in this case. Of course, don't save variable selection from the UI.
Related
I have database with a MariaDB backend and a MS-Access frontend. I have a table with a column with the data type set to "time(6)". In my backend, the column only shows time-values between 00:00 and 23:59. There are no dates in that column.
However, when I open the (linked) table in my Access frontend, it shows date AND time in that column. It always shows the current date and the time value from the backend-table. So if the actual value in the field is "16:25", Access will show "07.02.2023 16:25" (current date in German date format).
I have a form in Access where one can edit the data for a specific recordset. In that form there is also a textbox for the time value. When the textbox is not selected, it will show the correct time (e.g. 16:25). However, as soon as I click into the textbox to edit the time, it will suddenly show date and time (e.g. 07.02.2023 16:25). The format of that textbox is set to "Time, 24h" though.
How can I make the textbox show only the time without date, even when the textbox is selected? Why does my Access frontend interpret the time value as a datetime value?
If I set the property "Show Date picker" of that textbox to "For dates", it will show the date picker after selecting the textbox, despite the fact that the format is set to "Time, 24h". This doesn't make sense to me. Any ideas? Thank you!
I updated the ODBC connection to the table several times, but in my frontend there are still datetime values in the column that should only have time values.
Why does my Access frontend interpret the time value as a datetime
value?
That's by design as Access doesn't have discrete data types for date and time.
You can easily read the time only:
=TimeValue([YourTimeField])
An edit can be done in an unbound textbox. Use the AfterUpdate event of this to write the edited time.
Also, see my article:
Entering 24-hour time with input mask and full validation in Microsoft Access.
I'm working on a report in SSRS (Report Builder).
I created 2 parameters: 'date_from' and 'date_to' (and also added parameters to my query which I assigned to report parameters). Need to say that I used 'Convert' on a date becuase it was dat+time format in my dataset - that's why I converted it to date format.
Default value for 'date_from' is =DateAdd("d",-1,Today()), default for 'date_to' is just =Today()
When I run report everything is ok - proper data is returned based on dates but the problem occurs when I try to change dates in the filter above the report.
First of all - date doesn't show up in filter field when I choose it from the calendar, I can see just empty field as below (after setting default values for dates). Don't know, maybe this is how SSRS works:
Second - when I choose date from filter the date doesn't show up in date field (e.g. "Start date') but disappears. So I can't choose dates at all. Sometimes I can choose a date for 'Start date' but when I choose date for next field - 'End date' then date from 'Start date' disappears. And finally the result is as in the picture I pasted above - empty date fields.
So, summing up - I can set default values but when the report runs and I need to change dates it doesn't work at all.
Is it some kind of a bug? Or maybe I need to set other options or date formats?
I am trying to get the data from a period of time. They are set to actual dates but I wanted to know if it was possible to always have it set to today's date without having to go back and change it every time.
query params
You can add the following in the "Pre-request Script" heading below the URL field.
postman.setGlobalVariable('currentDate', (new Date()).toISOString());
Then add the variable wherever you are wanting to use the current date
{{currentDate}}
For example passing the current date as a query param
www.example.com/path?date={{currentDate}}
In my win form application I have used 'Advanced DataGridView'. For filter string columns it is working good but when i filter Datetime column the grid view becomes empty.
When i did debug it, i came to known that it is getting only dates and not dateTime from the column i.e
([Date_Time] IN ('11/04/2017', '12/04/2017', '13/04/2017'))
and this is the reason why my grid view become empty because there is no row with only date.
here is my code for 'Change filterString' event
Me.crossMatchBindingSource.Filter = dgvCrossMatchDetails.FilterString
So, my question is how can i include time in the filter.
I believe you are trying to bind a grid view to a data source, which uses SQL to extract data from the databases. I believe you can just amend your SQL as follows:
([Date_Time] between ('11/04/2017' and '14/04/2017'))
This should cater for times as well as dates.
You should just go to DataGridView properties and set "DateWithTime" to "True".
Then you are able to filter by Date and Time now.
Please correct me if i m wrong. whoever created AdvancedDataGrid, the code he/she wrote to filter can only filter the date and not the datetime. So i should split my datetime in two columns then i will be able to filter my dates. Actually i have done it and it is working perfectly but time column shows every record separately like text in the filter and not making grope of hours and minutes as excel does.
I have a formula in crystal reports that uses a year period to select its date range.
I want to edit it to bring back a range rather than just a single period.
However it is not giving me the option when entering values to give two parameters.
Current Code:
{PDP_ACC_PERIODS__.ACC_PERIOD} in {?ACC_PERIOD} to {?ACC_PERIOD}
But there is only one box to enter this, not two (as in from and too).
Added an identical parameter called ACC_PERIOD2 that looks at the same field, then added it in the selection expert as.
ACC_PERIOD
is between {?ACC_PERIOD}
{?ACC_PERIOD2}