cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hpkeong
Level 10

DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Hi PG

 

Glad to have CDM.

Again, just like initial stage in Jan 2016, where I posted many doubts and questions on DATE and finally resolved, in Excel.

Now, in CDM, Date format again giving me a lot of nightmares.

 

In Productivity Apps, Date is the most important field and must be easily picted like DatePicker.

(though dropdown for Year, Month and Day can be on option but that is for Tablet/PC. For Mobile Phone, the screen is very limited and hence DatePicker is crucial).

 

DatePicker:

 

I have no problem to select date from DatePicker1.SelectedDate to be inserted into EXCEL.

But in CDM, I have just found a bug.

- Date Properties: set to DATE, will result in Extra One Day

- e.g.: DatePicker = 19/08/2016, but after saving, the displayed date is 20/08/2016.

 

However, in CDM, if I ignore the Date properties and set it as TEXT, and when saving, {... Date: Text(DatePicker1.SelectedDate, "dd/mm/yyyy"...}, then the date will be no problem.

 

Screenshot (6).png

 

2. Date Comparison

 

When using Excel, I can easily use Filer. But in CDM, it give me warning.

 

The following syntax was given warning:

- Filter(SalesPlanPL, DatePicker2.SelectedDate = Date);

- Filter(SalesPlanPL, Filter(SalesPlanPL, DateValue(Text(DatePicker2.SelectedDate, "dd/mm/yyyy"), "fr") = DateValue(Text(Date, "dd/mm/yyyy"), "fr"))

- Date is one of the field appended with DatePicker.SelectedDate

 

Thanks and please advice fixing of bugs or syntax.

 

 

 

 

 

hpkeong
8 REPLIES 8
Power Apps Staff aftowen
Power Apps Staff

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Does the first problem recur if you set the DateTimeZone property of the DatePicker control to UTC (not Local)?

hpkeong
Level 10

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Hi

 

Thanks for replying to first question.

NOPE!

I tested for both DateTimeZone: UTC and Local. Both DatePicker are giving One Extra Day.

 

Surely there is something wrong.

Currently I have no choice but set the properties of Date in Entity to TEXT and format during saving.

 

Awaiting for further confirmation.

TQ

hpkeong
Power Apps Staff Vijeta
Power Apps Staff

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Hello

 

Thank you for your feedback. Can you please tell if you face the same issue (different by one day) when you use app from data on your entity?

hpkeong
Level 10

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Hi

 

As explained in my first posting, if the Properties of Date is set to TEXT, I have no problem to add DatePicker in app and the date is alright. Only when I use Date for the Properties of the entity then extra one day will definitely happen.

 

Excel with DatePicker has no problem, too.

 

Please verify.

hpkeong
Power Apps Staff aftowen
Power Apps Staff

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Vijeta, this problem repro'd for me when I created an app from blank and used the Patch function.

 

It didn't repro when I:

  • automatically generated an app from data
  • created an app from blank, added an Edit form, and used the SubmitForm function

 

pkhong.png

 

 

hpkeong
Level 10

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

Hi and thanks to Aftowen.

 

Wish Vijeta can ehlp to investigate what actually goes wrong with the DatePicker which produces different outcomes under different scenario.

 

Thanks in advance.

hpkeong
Power Apps Staff Vijeta
Power Apps Staff

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

This issue has been fixed in the latest release (2.0.500) of the studio. Thanks

Highlighted
hpkeong
Level 10

Re: DatePicker for CDM properties field - Different by ONE DAY & Date Comparison

HI

 

I have replied on another post that the issue was resolved in 500 version.

Thanks.

hpkeong

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,756)