cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
yoshihirok
Memorable Member
Memorable Member

Get Now Date Time

How can I get Now Date Time ?

I want to insert Excel file Now Date Time with some values.

 

My Senario:

A Button which get some actions and insert rows to Excel with Current Date Time.

 

I hope to use the utcnow() function of "Workflow Defenition Language" in Microsoft Flow.

and I hope to get Now Date Time without any services like Azure Function.

 

Regards,

Yoshihiro Kawabata

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi Yoshihiro Kawabata,

 

Based on my testing, it seems that the Excel Insert Rows won't accept the utcnow() as a valid date format.

I created a Button Flow, which would insert rows in Excel with three testing columns, and I would always receive the following error:

 

"status": 400, "message": "Invalid value ''utcnow('yyyy-MM-dd')'' for field 'Column1', please use a valid ISO8601 date such as '2011-12-13T17:58:57Z'.", "source": "127.0.0.1"

 

Which made me suspect that this should be not supported currently.

And there is no documentation available explaining this part, I will try to confirm this from my side.

Edited:

Adding some thread reference:

Workflow Variables in Microsoft Flows

When putting "@{addhours(utcnow(),4)}" into Excel insert Row method, in the error message it will generate the current date.

But Currently I can't manage to insert this value into Excel.

17.PNG18.PNG

 

Appreciate your understandings.

Regards

Community Support Team _ Michael Shao
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

6 REPLIES 6
v-micsh-msft
Community Support
Community Support

Hi Yoshihiro Kawabata,

 

Based on my testing, it seems that the Excel Insert Rows won't accept the utcnow() as a valid date format.

I created a Button Flow, which would insert rows in Excel with three testing columns, and I would always receive the following error:

 

"status": 400, "message": "Invalid value ''utcnow('yyyy-MM-dd')'' for field 'Column1', please use a valid ISO8601 date such as '2011-12-13T17:58:57Z'.", "source": "127.0.0.1"

 

Which made me suspect that this should be not supported currently.

And there is no documentation available explaining this part, I will try to confirm this from my side.

Edited:

Adding some thread reference:

Workflow Variables in Microsoft Flows

When putting "@{addhours(utcnow(),4)}" into Excel insert Row method, in the error message it will generate the current date.

But Currently I can't manage to insert this value into Excel.

17.PNG18.PNG

 

Appreciate your understandings.

Regards

Community Support Team _ Michael Shao
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

Hi, @v-micsh-msft

Thank you for your testing, and your research.

 

My tested flow is similar your testing with Button and Excel file and utcnow ().

 

So, I'm looking for the other method for get now date time.

 

Regards,

Yoshihiro Kawabata

Until these inline functions are supported across more actions, I would recommend using an HTTP request action using the open timeAPI : http://www.timeapi.org/utc/now

 

 

Hi @patrickabel

 

Thank you the information of open timeAPI.

I will try timeAPI with my flow.

 

Regards,

Yoshihiro Kawabata

Anonymous
Not applicable

I think I have a new solution, the best way to do this is to use "Compose" action with the following:

 

@formatDateTime(utcnow(),'yyyy-MM-dd')

Feel free to change the format to something that will include what you need.

Anonymous
Not applicable

I think I have a new solution, the best way to do this is to use "Compose" action with the following:

 

@formatDateTime(utcnow(),'yyyy-MM-dd')

Feel free to change the format to something that will include what you need.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,460)