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

Format Datetime from Survey123 to row table excel

Hello to every one, i'm a new user in this wonderful app, but in my trying to understand the use of this app i have had troubles customizing my date of register from survey123 to a row in table excel. 

 

I have written this piece of function in my box 

formatDateTime(concat(addseconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['FECHA'],1000) , 'dd/MM/yyyy'),' ',triggerBody()?['feature']?['attributes']?['HORA']), 'dd/MM/yyyy hh:mm')
 
but i have the follow error message:
Unable to process template language expressions in action 'Add_a_row_into_a_table' inputs at line '1' and column '2906': 'In function 'formatDateTime', the value provided for date time string '19/11/2020 18:49' was not valid. The datetime string must match ISO 8601 format.'.
 
I would like asking what is the  suitable way to concat a date which represents  "dd/mm/ YYYY " and an Hour (string format) which represents "hh:mm" and then represent this variables as one variable in date format to print in a row table of excel...
 
I really appreciate your helping.
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @jalastrag28 :

Firstly, let me explain why you encountered this problem.

The point is the value of

concat(addseconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['FECHA'],1000) , 'dd/MM/yyyy'),' ',triggerBody()?['feature']?['attributes']?['HORA'])

do not match ISO 8601 format.

The correct ISO 8601format is

yyyy-MM-ddThh:mm

Finally, please try this formula:

formatDateTime(concat(addseconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['FECHA'],1000) , 'yyyy-MM-dd'),'T',triggerBody()?['feature']?['attributes']?['HORA']) , 'dd/MM/yyyy hh:mm')

Best Regards,

Bof

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @jalastrag28 :

Firstly, let me explain why you encountered this problem.

The point is the value of

concat(addseconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['FECHA'],1000) , 'dd/MM/yyyy'),' ',triggerBody()?['feature']?['attributes']?['HORA'])

do not match ISO 8601 format.

The correct ISO 8601format is

yyyy-MM-ddThh:mm

Finally, please try this formula:

formatDateTime(concat(addseconds('1970-1-1', Div(triggerBody()?['feature']?['attributes']?['FECHA'],1000) , 'yyyy-MM-dd'),'T',triggerBody()?['feature']?['attributes']?['HORA']) , 'dd/MM/yyyy hh:mm')

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (30,292)