cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SaWu Impactful Individual
Impactful Individual

Unmodified standard (view/edit) form datacard for DateOnly CDS field shows time as well

Please be so kind as to read my full post before responding.
Thank you for your consideration.

As a preparation for a PowerApps workshop, I (re)did the current "App in a Day lab" excercises.
http://aka.ms/appinaday
In lesson 2
PAHandsOnLabContent\02-Common Data Service for Apps Lab Manual.pdf

I noticed that the default, standard, unmodified, Display Form for a CDS DateOnly field still shows a time as well, and the data type seems to DateTime.
The result looks like this, including a time:
image.png

As far as I understand, according to the course pdf, I should be getting a pure date field instead:

image.png
The field is set up as DateOnly

image.png

The used display form is, as mentioned, unmodified, with data cards still locked
image.png


Session ID: 279a5d39-9033-46ce-9d22-290657c53648
PowerApps 3.19042.26

My question:

  1. How do I get the Data Card for Request Date to only show the Date?
  2. In particular: Do I have to unlock the data card to deviate from the default to show only the date for a DateOnly field?
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Unmodified standard (view/edit) form datacard for DateOnly CDS field shows time as well

Hi @SaWu

 

If you unlock the Label for the date (DataCardValue25 in this case) and change its value to:

Text( DateTimeValue(Parent.Default), "[$-en-US]dd/mm/yyyy")

..Then it will display only the date

 

PowerApps Date fields on forms are a DateTime Value as indicated by your screenshot:

image.png

 

Cheers,

ManCat


@iAm_ManCat
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

Thanks!
You and everyone else in the community make it the awesome and welcoming place it is,
keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

3 REPLIES 3
Super User
Super User

Re: Unmodified standard (view/edit) form datacard for DateOnly CDS field shows time as well

Hi @SaWu

 

If you unlock the Label for the date (DataCardValue25 in this case) and change its value to:

Text( DateTimeValue(Parent.Default), "[$-en-US]dd/mm/yyyy")

..Then it will display only the date

 

PowerApps Date fields on forms are a DateTime Value as indicated by your screenshot:

image.png

 

Cheers,

ManCat


@iAm_ManCat
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

Thanks!
You and everyone else in the community make it the awesome and welcoming place it is,
keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

SaWu Impactful Individual
Impactful Individual

Re: Unmodified standard (view/edit) form datacard for DateOnly CDS field shows time as well

Hi @iAm_ManCat 

Thanks for solution in the sense that it gives me what I want.
It appears strange to me though, that the default (locked) DataCard settings for DateOnly fields, confusingly for me, show a time as well.

Thanks,
    Sa.

Super User
Super User

Re: Unmodified standard (view/edit) form datacard for DateOnly CDS field shows time as well

You're welcome, glad to help Cat Very Happy

 

.. And yes, the CDS entity is called DateOnly (even though this is likely a date with a 12:00 time that is set to only display the date), so it's an ambiguous case in that PowerApps uses a DateTimeValue to present it.

 

Happy to help out if you have any further issues with this kind of thing going forward - just raise a new request and either I or one of the others on the forum will be able to help Cat Happy


@iAm_ManCat
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

Thanks!
You and everyone else in the community make it the awesome and welcoming place it is,
keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

Top Solution Authors
Top Kudoed Authors
Users online (5,105)