enter image description here
#jtsnr --This snapshot from jasper server.I clicked outside the text box Dateto and a calendar is displayed. But there is no calendar icon outside the boxes as seen in previous example. Also, the text box takes any text typed into it but throws error that type a valid date.If date is typed it accepts it.I want it should accept only dates picked from calendar or typed dates only. Is that possible?
When you create the input control in JasperServer via the wizard you need to select a Type of Date at the Set the Datatype Kind and Properties stage.
Related
I want to display a single date dynamically in Google Data Studio. e.g. I want to display last Monday's date whatever it was e.g. 09-11-2020 and it would change to 16-11-2020 as the Monday 16-11-2020 would pass and so on.
I have a connection with BigQuery and I can connect from there to bring the date dynamically from BigQuery as:
SELECT DATE_TRUNC(DATE_ADD(CURRENT_DATE(), INTERVAL 7 day), WEEK(MONDAY)) as coming_monday
&
SELECT DATE_TRUNC(CURRENT_DATE(), WEEK(MONDAY)) as last_monday
So calculating dates isn't a problem as they are being received in Google Data Studio, however, I could not display them appropriately using any of the Google Data Studio tools like Text, etc.
Dates can currently be displayed in Google Data Studio Scorecards; in addition, the Calculated Fields in the question could be recreated by copy-pasting the below into the respective Scorecards, aggregating by MAX or MIN (which would display the same Date in this scenario) and then setting the Type to Date (Default: Date & Time):
1) Coming_Monday
DATETIME_TRUNC(DATETIME_ADD(CURRENT_DATE(), INTERVAL 7 DAY), ISOWEEK)
2) Last_Monday
DATETIME_TRUNC(CURRENT_DATE(), ISOWEEK)
Editable Google Data Studio Report and a GIF to elaborate:
It cannot set single dynamic value with straightforward way as text in GDS now.
But, you can use normal Table tool of GDS with single row, and it will show as single dynamic value that you need. Scorecard can also be used.
Here is how-to of using Table.
Under Data menu, set the date column that you want to display in Dimension, and do not set Metric. Also, choose Rows per page as 1.
Under Style menu, uncheck the Show header checkbox, Rows numbers checkbox and Shows pagination checkbox.
When you view the report, it will show as text.
I want to restrict future date selection in AEM adaptive forms.
Also if there is any way to restrict date selection unto any particular date (any future or past date)
You can configure the Minimum Value and the Maximum Value for the date field to prevent the user from selecting a date which is outside this range. However, there are certain restrictions
The values mentioned above cannot be dynamic and would be a fixed value. Hence, you cannot set them to something like today or now. It has to be a value in the ISO format which is yyyy-mm-dd.
As long as you have not specified a display pattern (i.e., you are using the default value of the field), it would bring up the browser's native date picker which disables the dates outside your minimum and maximum range. However, if you set a display format, then AEM's datepicker would be displayed and it doesn't disabled dates outside the min-max specified.
That being said, you can still write a validation rule which throws an error if the value selected/entered is outside the valid date range or if it is greater than today (depending on what you want to validate).
Open the rule editor.
Click on Create rule.
Select Validate by clicking on the dropdown arrow beside the When (which is the default)
In the Using Expression section, select your date field for the First Object, select is before for the operator and select Function Output > Get Current Date for the second object.
The final rule should look as shown below
I have a problem to display a date in crystal reports. The field is from database, and it shows the time, too. I need to display only the date.
I observed that if I click on the Text Format from the date, in the Font tab at Sample it is showed with time. I think that is the problem, but I can't modify, I can't delete the time from the Sample box.
Do you have any idea how to resolve this?
The data-type of the column inside the database seems to be text/varchar instead of datetime.
The best would be to fix the data-type on the table inside the database.
If you don't have the option to change the datatype directly on the database, you can use following formula to convert it to DateTime inside the report.
If IsDate({Table.DateTimeColumn}) Then DateTime({Table.DateTimeColumn})
On the properties of the formula field there will be the option for the different formats then.
I have a list box of dates and a table which has datetime as dimension. The dates from list box is a separate table from that with complete date. I tried connecting them by cutting the datetime into just date (another field) in my select script but did not work. So I thought this should be done on the conditional of datetime dimension but I'm not sure how to do this. How should I be able to show data based on selected dates in Filters?
I would recomend two different approaches, recomending the first one :
On the LOAD script, along side loading the DateTime field, loading the same field again with only the Date part and use than one for filtering. Something like :
LOAD
<... some fields ...>
DateTimeField,
Date(Floor(DateTimeField)) as DateTimeFieldFilter
<... some more fields...>
Add a field selector for you DateTime field, then to Properties, Field dropdown and choose the last option "Expression". On the Expression box enter Date(Floor(DateTimeField)).
I am working on a home accounting template (and could not find any good one :-/), so I am creating one for each month. Both in my expenses and my incomes, I would like to have a date column where I just have to insert the "day" (e.g.: 22) and it automatically fills the rest with the current month and year (or I could set them in another cell).
For example: 22 + ENTER would return: 22/12/2014
If I do this, I automatically get a default date: 22/01/1900
I do not know if it is possible to change this defaul date depending on the current one or any other value.
I have tried with a different strategy: if the amount column is not empty, fill in with today's date: =IF(A3="";"";TODAY())
The problem is that I do not always register today's expenses, so I need to change it manually. I was just wondering if this is possible and there is a better way (maybe a macro?).
You need Excel to modify the cell contents after you press ENTER. The only option seems to be a Macro using the Worksheet_Change event.
Please check out this other question. I think that will help.
This can be achieved with simple formatting and use of controls that are available in Excel. VBA will give you drastically more flexibility, however the request above can be accomplished without learning VBA.
I have included a sample file here.
Steps to recreate:
Create a range of months. I created a range including the current month through 12/2014
Insert a combo box from the developer tab. Right click and select Format Control. On the Control tab, input the range you just created and then select a "linked cell". This will insert an integer to indicate which item you picked in the list, starting at 1.
Use the attached formula to add the DAY that you enter in the first column and VLOOKUP the month and year from the value chosen in the combo box.
Enhancements: I used conditional formatting to change the text color of the days you enter to WHITE. This way you won't see them. I also included some checking in the VLOOKUP formula: the day you enter must be a number and must be non-blank for a date to populate.