cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kosenurm
Super User
Super User

Model driven app page - combobox 'modifiedon' as Date formatted

Hi there, 

 

I have a 'canvas page' within my model-driven app. In this page, there is a ComboBox, double, whereby I am including one column (test) as the primary, and then I want to display the 'modifiedon' value as the Secondary item. 

 

I have done this as follows:

 

["new_partyinvolved", "modifiedon"]

 

But the modifiedon value then displayed in the combobox is "1660048378000" - so the long-form of the date. 

 

How can I amend this so that the modifiedon appears as dd-MM-yyyy (with no time)?

 

Thanks

K.

3 REPLIES 3
timl
Super User
Super User

Hi @Kosenurm 

I'd try adding the formatted date to the Items property of the Combobox

AddColumns(YourDVTable,
           "ModifiedOnFormatted",
           Text('Modified On', "dd-mm-yyyy")
)

You can then modify the displayfields property like so, and that should hopefully work.

["new_partyinvolved", "ModifiedOnFormatted"]

 

Fab, thank you. Is it possible to then Sort the combobox from newest to oldest based on ModifiedOnFormatted?

 

Thanks

K.

timl
Super User
Super User

@Kosenurm,

Yes - if you sort by 'Modified On' rather than the formatted value, that should give you the result that you want.

Sort(
   AddColumns(YourDVTable,
               "ModifiedOnFormatted",
              Text('Modified On', "dd-mm-yyyy")
   ),
   'Modified On',
   Descending
)

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,974)