cancel
Showing results for 
Search instead for 
Did you mean: 

Date Picker for Query Variable

Former Member
0 Kudos

Hello,

I have a query, which has a input variable as date. For the Query Variables when i drag and create an input form, i have the field as input field. How do i change this field to a date picker drop down...I do not get any option to make it as a date picker/calendar...

REgards,

Vikram

Accepted Solutions (1)

Accepted Solutions (1)

former_member202465
Contributor
0 Kudos

Hello Vikram,

If I understand correctly, the field type is String, but it represents a Date. You want to be able to edit it as such.

1. In the input Form open the Define Data dialog (using the Right Click context menu) and add a field of type Date (letu2019s say its name is u201CDATE1u201D).

2. On the link between the input Form and the Service Open the Map Data dialog using Right Click => Map Datau2026

3. Find the relevant Field Assign in the table. Here you want to get the Date value converted into a String. From the Assign Value drop down you can choose Define Expression to open the Dynamic Expression Editor (you can skip this and write the value yourself in the Assign Value input if you know what to write).

4. On the right hand side you have model elements and functions to create an expression. You can use the function DSTR(@DATE,[format]) u2013 where parameter 1 is the Date field and parameter 2 is the Format (optional). The function returns a String representation of a given Date.

5. Your expression can look like this for example: =DSTR(@DATE1,"dd/mm/yyyy"), assuming the name of the new Date field in the Form is DATE1.

6. You can remove the old Text field from the Input Form if you donu2019t need it u2013 using the Define Data dialog.

Hope this helps,

Udi

Former Member
0 Kudos

Hello Udi,

Thank you. Issue resolved.

I am able to pass date using the date picker to the variable date. However how do we control the display of the date picker, currently, once i select the date from the Date1 (example provided above by you), the format is mm/dd/yyyy. i need the format of date1 to be dd/mm/yyyy.

Any helpful inputs.

Regards,

Vikram

Former Member
0 Kudos

Duplicate reply...hence deleted..

Answers (0)