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

Formatting date retrieved from google calendar

I was succesful in connecting my apps to my google calendar API but currently stuck on how to format the date into a more representative format. I had tried using several options but yet to solve this issue of mine

 

The formula that I had tried was    Text(start,"[$-en-US]mm-dd-yyyy") which I learned from a webinar. It did not show any error in the formula but did not change the date format either. Hopefully someone could enlightened me with a sollution 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff AndyPennell
PowerApps Staff

Re: Formatting date retrieved from google calendar

Hard to be sure from your screenshot, but I think dates are arriving as utc format strings. If true, then try this formula:

Text(DateValue(start), "[$-en-US]yyyy-mmm-dd")

This takes the Google string, parses it with DateValue to turn it into a DateTime type, then uses Text to format that DateTime as desired.

View solution in original post

4 REPLIES 4
PowerApps Staff AndyPennell
PowerApps Staff

Re: Formatting date retrieved from google calendar

The first thing to check is the actual type of the variable start: if it is in fact a string then you will need to turn it into a DateTime (using the DateValue) first, then you can reformat it using Text in the manner you listed. If problems persist please share the value you are seeing for start.

Amf
Level: Powered On

Re: Formatting date retrieved from google calendar

Good day Mr Andy,

 

Thank you for your reply. I'm not sure on the format of the date in google calendar and how to go about searching for it. However just to better describe my current stumbling block. Here is a screenshot of what I'm currently testing out.

 

 

Sketch.png

 

 

 Hopefully this better describe my situation. I'm currently exploring other connections to understand what powerapps can achieve. Thank you sir and have a wonderful day ahead Smiley Happy

 

PowerApps Staff AndyPennell
PowerApps Staff

Re: Formatting date retrieved from google calendar

Hard to be sure from your screenshot, but I think dates are arriving as utc format strings. If true, then try this formula:

Text(DateValue(start), "[$-en-US]yyyy-mmm-dd")

This takes the Google string, parses it with DateValue to turn it into a DateTime type, then uses Text to format that DateTime as desired.

View solution in original post

Amf
Level: Powered On

Re: Formatting date retrieved from google calendar

Thank you very much Mr Andy, it  worked perfectly!  Smiley Happy Learned  I new thing today. You have a great day ahead.

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
Users Online
Currently online: 135 members 5,352 guests
Please welcome our newest community members: