How to add current time in rdl? - rdl

How to add Current Time in Rdl report SSRS.
Please any one help me...
I am using Date for
=DateAdd("m", -1, Now)
but for Time only?

If you are trying include the print time and date you can also use the global variable
=Globals.ExecutionTime

Try this !
=Now()
=DATEADD("m", -1, now())

Related

Prestashop 1.7.8 Specific Price - Smarty - retrieve day

As they still haven't decided to put the time to work in the date-picker of discounts.
Wouldn't it be possible to take 1 day off the code that shows the end date of the promotion?
This code displays the end date of the promotion, but due to the time issue the promotion ends before the end of the day, so we have to add a day on the backoffice side. And the idea in this code was to remove the extra day to hit the date right, you know?
{l s='End promo: '}{$product->specificPrice.to|date_format:'%d-%m-%Y' . "-1 days"}
but not working... i have tried a lot of combinations and nothing.
I await your comments.
Thanks!
This will do the trick :
{l s='End promo: '}{"$product->specificPrice.to -1 Days"|date_format:'%d-%m-%Y'}
Here is the solution:
{if $product.has_discount}{dateFormat date=$product.specific_prices.from} to {dateFormat date=$product.specific_prices.to|cat:' -1 day'|date_format:'%Y-%m-%d'}{/if}
Hope this works for you guys to!

Karate UI - When i enter expiration date, it is not taking it correctly

I want to enter month and year in the expiration date field. and I used this And input('#card_expDate', "0828")
But it takes the value in the field as 82/80.. I want it to take it as 08/28
Tried And input('#card_expDate', "08/28") as well and no luck
Can someone please help me on this?
There can be many reasons for this, most likely because the page has some fancy javascript. No one can help you unless they see the actual page.
The only suggestions I have are:
try adding a delay before each keystroke: https://github.com/intuit/karate/tree/master/karate-core#input
e.g. * input('#card_expDate', '0828', 100)
try setting the value using value(): https://github.com/intuit/karate/tree/master/karate-core#valueset
e.g. * value('#card_expDate', '08/28')
resort to executing custom JS in the page to do what you want: https://stackoverflow.com/a/60800181/143475
Else please follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Selecting a datetime range in YII input form

Here is the problem.
I have to create a submission form on my Yii-based website. The form requires to enter a datetime range.For that I am using "jui datetimepicker" third-party Yii extension.
http://www.yiiframework.com/extension/datetimepicker/
I use two date fields with this extension pertaining to start and end time respectively. So, what I want to achieve is be able to restrict the start datetime only to time in the future (neither past dates nor time should be selected) and the end time itself should be restricted to the maximum of three hours following the start time.
EXAMPLE: a user wants to schedule an event. They choose a date and time, which are of course in the future. Let's say they choose March 15, 13 O'clock as the start time in the start time field. Once they are done and move to the next field ("end time"), the respective datetimepicker restricts the range of time from March 15, 13:00 to March 15, 16:00.
Hence the second datetimepicker should be dynamically updated depending on the input of the first one.
It's possible o specify date range in the datetimepicker starting from the current date, but there is nothing like that for the time selection, so a user still can select time which has already passed.
It's not that I want to solve this problem with this extention, if anybody has any suggestions about YII solutions allowing to specify a datetime range in the most clean and effective way - it would be much appreciated.
You should use the edaterangepicker extension instead.
Given the API for the jquery timepicker addon. you should add the following to your widget call (along side 'model','attribute', etc)
'options'=>array(
'minDateTime'=>'<start dateTime here>',
'onSelect'=>'<JS function to run>'
)
The function you run on the "onSelect" event should dynamically set the minDateTime for the second dateTime input field, for ex:
function (selectedDateTime){
<EndDatePickerElement>.datetimepicker('option', 'minDateTime', <start dateTime here using selectedDateTime> );
}
There are more examples on the link provided earlier if you need to make it even more precise (like say if you wanted the starting date to be pushed back by the amount of time the user was on the page rather than it being set when the page was loaded. etc...)

how to check current system date format?

How can i check the system date format? Tried with the code below, but when i change my system's date format to another date format to test the code, it's still showing the date format before changed!
System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern()
Ok. I managed to find the solution, the 'CurrentCulture' has to be 'CurrentUICulture', instead of CurrentCulture. Which is as below:
System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern()

Set Reporting services parameter value in subscription as current date

In reporting services SQL server , when I created a subscription for a report with parameter as date time type, I don’t know how to set up value of the parameter as current date (wherever the subscription is running).
I tired Today(), Today, today, #ExecutionTime. But none of them worked for me. Only a specific date worked eg: “11/11/2010 00:00:00”.
I also tried to hide the parameter but the subscript still required to fill the parameter. For the "default value” textbox did not allow the value “Today()”, “Today”, etc.
Thanks in advance!
Helen
You need = to make it an expressions
= Today()
You can't put "=today()" in the text box prompt at runtime. You have to setup the parameter's default value as "=today()" in visual studio.
Try Data Driven subscription and pass a SQL Statement to return the current date for the parameter value.
The following code worked on my case:
parameter1.Value = Date.Today()
Actually I did that in visual studio and it worked well in preview (display the current date by default for the parameter and allow people to select other date) .
But for some reason, the subscription setting still asked me for the parameter value (as in the early post "Report Parameter Values").
On the report parameter configuration (on development time, not on the subscription creation), add a default value for the parameter. If you do, you will have a check box called "use default value" when creating the subscription
I tried it as well but it did not work for the subscription.
Sorry I can not attach the screen shot in the post currently.
In Subscription screen shows:
Report Parameter Values
Specify the report parameter values to use with this subscription.
Date To = Today()
Regards,
Helen
If you want to default the report parameter to the current date in the short format, you can set the default value of the parameter to the expression:
=CDate(FormatDateTime(Now, DateFormat.ShortDate))