Skip to content
Home » Calendar and Clock functions in Power Apps

Calendar and Clock functions in Power Apps

The Calendar and Clock functions are used to display dates and times in the language of the current user.

Calendar and Clock functions functions return single-column tables that can be used directly with the Items property of Dropdown and Listbox controls.




The available Calendar and Clock functions in Power Apps are listed below.

Calendar.MonthsLong() :

It returns the value contains the full name of each month, starting with “January”. For example, “January”, “February”..

Let’s add a drop down control, go to the Insert tab and select Drop down control.

Now, go to the Items property of drop down and write the Calendar.MonthsLong() function.

Calendar.MonthsLong()

You can see, it displays the full name of each months in drop down.

Calendar.MonthsShort():

It returns the value contains the abbreviated name of each month, starting with “January”. For example, “Jan”, “Feb”..

Let’s, go to the Items property of drop down and write the Calendar.MonthsShort()  function.

Calendar.MonthsShort()

 

You can see, it displays the abbreviated name of each month in drop down.

Calendar.WeekdaysLong():

It returns the value contains the full name of each day, starting with “Sunday”. For example, “Sunday”, “Monday”..

Let’s, go to the Items property of drop down and write the Calendar.WeekdaysLong()    function.

Calendar.WeekdaysLong()

You can see, it displays the full name of each day in drop down.

Calendar.WeekdaysShort():

It returns the value contains the abbreviated name of each day, starting with “Sunday”. For example, “Sun”, “Mon”..




Let’s, go to the Items property of drop down and write the Calendar.WeekdaysShort()    function.

Calendar.WeekdaysShort()

You can see, it displays the abbreviated name of each day in drop down.

Clock.AmPm():

It returns the value contains the uppercase versions of the full AM and PM designations. For example, “AM”, “PM”. This language uses a 12-hour clock.

Let’s, go to the Items property of drop down and write the Clock.AmPm() function.

Clock.AmPm()

You can see, it displays the uppercase versions of the full AM and PM designations in drop down.

Clock.AmPmShort():

It returns the value contains the uppercase versions of the short AM and PM designations. For example, “A”, “P”. This language uses a 12-hour clock.

Let’s, go to the Items property of drop down and write the Clock.AmPmShort() function.

Clock.AmPmShort()

You can see, it displays the uppercase versions of the short AM and PM designations

Clock.IsClock24(): It returns the clock information for the user’s current locale. If the user’s system is set to a 24-hour clock format, it returns true otherwise false. This language uses a 12-hour clock.

Let’s take a Text label control and write the below function on it’s Text property.

You can see, it returns false. Means current user’s device is not set to 24- hour clock format.

 

Also Read..

Text function to format date/time or numbers to text string

With function in Power Apps

Filter function in Power Apps

LookUp function in Power Apps

ShowColumns function in Power Apps

Reset multiple control values and all the controls within a form

 

Loading

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.