hero_header_background
PowerApps : Date Only, How do I remove the time from a DataCard.
PowerApps : Date Only, How do I remove the time from a DataCard.
When you add a Date field from DataVerse to a Power Apps form the DataCard will automatically display the Date and Time. Sometimes you just want the Date and not the Time displayed. There are two methods to remove the times hour and minute fields.

The first method and the most easiest method is to simply hide the two fields. To do this Unlock the card by either (1) selecting the card, choosing Advanced and clicking the Unlock to change properties or (2) right clicking the card and click Unlock


Blog5-2


Once the card is unlocked click the Hours field, choose Properties and change the Visible switch to Off.


Blog5-3


Now you can do the same to the Minutes field.


Blog5-2


Now you can format your layout by dragging and dropping the label and date selector


Blog5-5


Now if your like me and you want to streamline your app and not have irrelevant fields hidden you can delete the fields from the Form but you must also delete the code that Power Apps automatically creates that refers to the two fields. So lets Unlock the card by either (1) selecting the card, choosing Advanced and clicking the Unlock to change properties or (2) right clicking the card and click Unlock


Blog5-2


Select the Ellipse next to the Hour Value and choose Delete. Then do the same for the Minute Value.


Blog5-6

Select the Ellipse next to the Hour Value and choose Delete. Then do the same for the Minute Value.


Blog5-6

You will now notice two red crosses on the top left hand corner of your data card. Click the cross and select Edit in the formula bar.


Blog5-7

Now in the formula fx bar you will see code referring to the fields.


Blog5-8

Remove all of the code for all formulas except for Update where you will leave the code DateValue1.SelectedDate


Blog5-9


Continue clicking the red crosses and removing the code until the red crosses disappear. Once the red crosses are gone you have successfully removed the fields from your card and you can format your layout by dragging and dropping the label and date selector.


Blog5-5

Leave a Reply

Your email address will not be published. Required fields are marked *