cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
venseben
Level: Powered On

Converting Date to text

Hi all.

 

I have a PowerApp formular where i use some date field pickers. I need to convert the date from the datepicker to "d. mmmm yyyy" so that 19-12-2018 would be converted to 19. december 2018. I can easly do this in a SharePoint list, but I am struggeling to get this done in PowerApps. When i use the "Now()" function it works okay, but when I use a date picker field, the trouble begins.

DatePowerApps.PNG

I think I might be doing something wrong when trying to convert the datefield. I have read several articles, but not yet found the answer. Hope anyone in this forum can help.

 

Greeting from Denmark

/Frank

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Converting Date to text

Hi @venseben,

Could you please share a bit more about the issue that you mentioned?

Do you want to convert the date format within the Date Picker control into "d. mmmm yyyy" or convert the date value selected from the Date Picker control into "d. mmmm yyyy"?

Further, could you please share more details about the issue formula within your app?
If you want to convert the date value selected from the Date Picker control into "d. mmmm yyyy", I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:7.JPG

Set the Text property of the Label control to following:

Text(DatePicker1.SelectedDate, "[$-en-US]d. mmmm yyyy")

If you want to convert the date format within the Date Picker control into "d. mmmm yyyy", I have made a test on my side, the screenshot as below:8.JPG

Set the Format property of the Date Picker control to following:

"d. mmmm yyyy"

Please check if you have typed proper Date time value within the Text function in your app. If the issue still exists, please consider take a try to re-create your app, then check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Converting Date to text

Hi @venseben,

Could you please share a bit more about the issue that you mentioned?

Do you want to convert the date format within the Date Picker control into "d. mmmm yyyy" or convert the date value selected from the Date Picker control into "d. mmmm yyyy"?

Further, could you please share more details about the issue formula within your app?
If you want to convert the date value selected from the Date Picker control into "d. mmmm yyyy", I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:7.JPG

Set the Text property of the Label control to following:

Text(DatePicker1.SelectedDate, "[$-en-US]d. mmmm yyyy")

If you want to convert the date format within the Date Picker control into "d. mmmm yyyy", I have made a test on my side, the screenshot as below:8.JPG

Set the Format property of the Date Picker control to following:

"d. mmmm yyyy"

Please check if you have typed proper Date time value within the Text function in your app. If the issue still exists, please consider take a try to re-create your app, then check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

venseben
Level: Powered On

Re: Converting Date to text

WOOOOOOW - @v-xida-msft, you just saved my day Smiley Wink

 

Both of your tips are working just great. Think I was to much in "SharePoint" mode. PowerApps realy looks awesome, but I need a steep learning curve.

 

have a great day, and a merry X-mas

 

/Frank

muralikrishna00
Level: Powered On

Re: Converting Date to text

Hi @v-xida-msft 

 

With DatePicker1.SelectedDate  we can get only "date/Month/Year" but how to get "Hours+Minutes" along with date, would like to get date and Time also.

Can you help us ..?

i also tried with below 

working till only date but not time.

Text((DateValue1.SelectedDate) And (HourValue1.SelectedText) And (Minutes1.SelectedText))

Text((DateValue1.SelectedDate) And Text((HourValue1.SelectedText)) And Text((Minutes1.SelectedText)))

 

getting error like function Text has invalid arguments.

 

 

 

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,083)