How to get start date assign to end date - oracle-adf

I have a ADF application which required to select (Drop down calendar) "Start Date" and "End Date". Currently when select Start Date, End date not automatically adjust to Start Date. It shows current date. Is there a way I can archive this without using Java bean?
I tried to add "pageFlowScope" to action and call the value to end date through minimum Value. This doesn't give result.
<af:inputDate id="id3" autoSubmit="true" autoComplete="on"
converter="javax.faces.DateTime" immediate="true"
action="#{pageFlowScope.dateOne}">
</af:inputDate>
<af:inputDate id="id4" autoSubmit="true" autoComplete="on"
converter="javax.faces.DateTime" immediate="true"
value='#{pageFlowScope.dateOne}"'>
</af:inputDate>
If Start Date Selected : "2019/05/05"
End Date Selection start with : "2019/05/05"
Jdeveloper : 11g
Deployed on Glassfish : 3.1

Related

Lightning Flow Query

I am creating the lightning flow. In which, I need to provide the date in the 'field1' (Type : Date) in the screen component.
In the screen component, the 'field1' should only accept the date value which is in the range of 3years in the past of the current date and 2 years in the future of the current date.
For instance, if a user is entering the value in the 'field1' Date field on 5/13/2021 then the valid date range is between 5/13/2018 thru 5/13/2023.
Can anyone please guide/assist on how to achieve this.
Thanks in advance.
enter image description here
To create this date field you need to use following formula
IF(OR(
({!Accepted_Date} <= (DATE(YEAR({!$Flow.CurrentDate}) - 3,MONTH({!$Flow.CurrentDate}),DAY({!$Flow.CurrentDate}) - 1))), ({!Accepted_Date} >= (DATE(YEAR({!$Flow.CurrentDate}) + 2,MONTH({!$Flow.CurrentDate}),DAY({!$Flow.CurrentDate}) + 1)))
), false, true
)

How to create an Equity Curve using the "Start Date and "End Date" using Google Sheets?

In the sheet given below you will see the "Start Date" and "End Date" both as drop drop list. My idea is when i change both the dates it has to give me a Equity Curve which will be a line graph as per the data mentioned in the drop down list. Say for eg if i mention the start date: 1 Apr,20 & end date:28 Apr,20 it has to take all the Equity Curve data ie starting from 50,000 to 46330.
https://docs.google.com/spreadsheets/d/1TUcsv_fs5DDFZ7gotY2WdM1IcoO3gR8G8wXedYVLffk/edit#gid=0
[Sample file]
maybe:
=SPARKLINE(INDIRECT("H"&MATCH(B2, C:C, 0)&":H"&MATCH(B3, C:C, 0)), {"charttype", "line"})

Using MSSQL 2016 "AT TIMEZONE" feature from Entity Framework?

How would one use the MSSQL 2016 AT TIMEZONE feature from Entity Framework?
In other words, how to generate
SELECT MyTimestamp AT TIME ZONE 'Central European Standard Time' FROM MyTable
by LINQ in entity framework ? Is it even supported yet ? Can one extend Entity Framework manually for this feature ?
There is always the option of creating a database-view with a time-zone column, but ideally I would like to avoid this extra view.
Couldn't you use a "model-defined function" in EF to create a functional expression that does at time zone thingy?
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/ef/language-reference/how-to-call-model-defined-functions-in-queries
<Function Name="TZ" ReturnType="Edm.DateTime">
<Parameter Name="date" Type="Edm.DateTime" />
<DefiningExpression>
date AT TIME ZONE 'Central European Standard Time'
</DefiningExpression>
</Function>
[EdmFunction("YourModel", "TZ")]
public static int TZ(DateTime date)
{
throw new NotSupportedException("Direct calls are not supported.");
}
#C:
from m as Mytable select new {TZ(s.MyTimestamp)};

What is the difference between how the "Data" and "Preview" data generation works in BIDS?

When I select the "!" ("Run") button on the Data tab of the design surface in a BIDS project, it prompts me for the parameters the Stored Procedure I have selected needs:
Once these are supplied, and I click the Okay button, I see the data returned in a grid within the Data tab.
Using the same Stored Procedure (but not selected exlicitly - apparently the project knows which one to use based on what is selected in the Data tab) on the Preview tab, instead of prompting me for the Stored Procedure's parameters with a dialog box, it presents controls (two DateTime pickers and a dropdown list populated with the appropriate options):
Yet, when I enter the same exact values that work on the Data tab in the Preview tab (selecting the value I entered for "Unit" from the dropdown list) and then select the "View Report" button, I get:
An error occurred during local report processing.
An error has occurred during report processing.
Query execution failed for data set 'PriceVarianceSP'.
Procedure or function 'priceAndUsageVariance' expects parameter '#Unit', which was not supplied.
It's true that priceAndUsageVariance expects #Unit:
CREATE Procedure [dbo].[priceAndUsageVariance]
#Unit varchar(25),
#BegDate datetime,
#EndDate datetime
AS . . .
...but it also expects two other values - all three of which HAVE been supplied. Is it only complaining about a supposedly missing "#Unit" value because that's the first one in the list, and it would complain about #BegDate and #EndDate missing, too, if it considered #Unit supplied, or the params were ordered differently?
Attempting to run (execute <- and I do feel like executing it, sometimes!) the report in SSRS (online) throws the same err msg as the Preview tab.
So how can I get this to work? Does something in the Stored Procedure need to change, or is there some change I need to make to my report file, or...???
UDPATE
If the .rdl may provide a clue as to what is here haywire, here it is, in all its radiant glory:
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="PlatypusData">
<rd:DataSourceID>875e488f-a3fc-4066-befb-5b85a938f58d</rd:DataSourceID>
<DataSourceReference>PlatypusData</DataSourceReference>
</DataSource>
</DataSources>
<InteractiveHeight>11in</InteractiveHeight>
<ReportParameters>
<ReportParameter Name="BegDate">
<DataType>DateTime</DataType>
<AllowBlank>true</AllowBlank>
<Prompt>Begin Date</Prompt>
</ReportParameter>
<ReportParameter Name="EndDate">
<DataType>DateTime</DataType>
<AllowBlank>true</AllowBlank>
<Prompt>End Date</Prompt>
</ReportParameter>
<ReportParameter Name="Unit">
<DataType>String</DataType>
<AllowBlank>true</AllowBlank>
<Prompt>Unit</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>UnitsQuery</DataSetName>
<ValueField>Unit</ValueField>
<LabelField>Unit</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
</ReportParameters>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<RightMargin>1in</RightMargin>
<LeftMargin>1in</LeftMargin>
<BottomMargin>1in</BottomMargin>
<rd:ReportID>bad7a923-1452-4e00-9cc3-1f437ad70ef6</rd:ReportID>
<DataSets>
<DataSet Name="PriceVarianceSP">
<Query>
<DataSourceName>PlatypusData</DataSourceName>
<CommandType>StoredProcedure</CommandType>
<CommandText>priceAndUsageVariance</CommandText>
</Query>
</DataSet>
<DataSet Name="UnitsQuery">
<Fields>
<Field Name="Unit">
<DataField>Unit</DataField>
</Field>
</Fields>
<Query>
<DataSourceName>PlatypusData</DataSourceName>
<CommandText>select distinct Unit from masterunits order by unit</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<Width>33in</Width>
<Body>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<Style>
<Color>SteelBlue</Color>
<FontFamily>Tahoma</FontFamily>
<FontSize>20pt</FontSize>
<FontWeight>700</FontWeight>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
<CanGrow>true</CanGrow>
<Height>0.36in</Height>
<Value>PriceAndUsageVarianceReport</Value>
</Textbox>
</ReportItems>
<Height>2.625in</Height>
</Body>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>
UPDATE 2
This is what solved the dilemma:
On the Data tab of the design surface, select the ellipsis dots ("Edit Selected Dataset").
In the Dataset dialog, choose the Parameters tab.
Set the values like so:
(Once you enter a Parameter name beneath the "Name" column, the "Value" column populates with available assignments from which you can choose).
When parameter values are not supplied, you will only get an error message about the first one, not about all of them.
Sounds to me that you need to go into the Parameters tab in your DataSet properties, and map the report parameters to the dataset parameters.

Select the current date and other date in the phpunit selenium?

I making the date format using jquery in the text box.
And want to know how can i select the date in the input box .
How can i set the value of current date format in the phpunit selenium?
try to use the php date function
$startDate = date('Y-m-d');
$endDate = date('Y-m-d', strtotime("+30 days"));
$this->type('name=from_date',$startDate);
$this->type('name=to_date',$endDate);

Resources