cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Creating a default date.

Hi all,

 

Hopefully an easy one for you. 

 

I have a datepicker that I want to change the default date for if a specific value is chosen. 

 

Currently this is 

If(DataCardValue3.Selected.Value="1708","22/05/2017",ThisItem.Testing_x0020_Start_x0020_Date)

 

This seems to work except the date in my datepicker is 10/5/2018. Any idea what I should be doing to get the date I want to appear?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
mr-dang
Level 10

Re: Creating a default date.

It looks like it is interpreting "22/05/2017" in mm/dd/yyyy instead of your intended dd/mm/yyyy

 

I would recommend the Date() function instead of using text:

 

If(DataCardValue3.Selected.Value="1708",Date(yyyy,mm,dd),ThisItem.Testing_x0020_Start_x0020_Date)

Edit the Date function to be your desired date.

 

Let me know how it goes.

Microsoft Employee
@8bitclassroom

View solution in original post

1 REPLY 1
Highlighted
mr-dang
Level 10

Re: Creating a default date.

It looks like it is interpreting "22/05/2017" in mm/dd/yyyy instead of your intended dd/mm/yyyy

 

I would recommend the Date() function instead of using text:

 

If(DataCardValue3.Selected.Value="1708",Date(yyyy,mm,dd),ThisItem.Testing_x0020_Start_x0020_Date)

Edit the Date function to be your desired date.

 

Let me know how it goes.

Microsoft Employee
@8bitclassroom

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 259 members 3,369 guests
Please welcome our newest community members: