Hi all,
Hoping someone can help me with this. I have a flow that when triggered, updates an excel spreadsheet in sharepoint. Issue is the date (column B) is not in a date / time format.
I'm using the add row function and had =DATEVALUE(LEFT(B2,10))+TIMEVALUE(MID(B2,12,8)).
Problem is the row is added at the end of the table and C5 should reflect =DATEVALUE(LEFT(B510))+TIMEVALUE(MID(B5,12,8)). Any suggestions on how I can update the addrow to know what is the correct cell reference?
Any help appreciated.
Solved! Go to Solution.
Hi @NiugeS :
Something like this?
If so,the Expression should be:
formatDateTime(triggerOutputs()?['body/Created'],'dd/MM/yyyy hh:mm:ss')
Best Regards,
Bof
Hi @NiugeS :
"2021-01-26T23:36:45.000Z" is the date in the standard ISO 8601 format.You can use this formula to convert it to the format of ‘dd/MM/yyyy hh:mm:ss’:
formatDateTime(B5,'dd/MM/yyyy hh:mm:ss')
I've made a test for your reference:
Reference Expression:
formatDateTime(triggerBody()['text'],'dd/MM/yyyy hh:mm:ss')
Best Regards,
Bof
@v-bofeng-msft Thank you for the reply. The problem is if I add another row, the next formula will require formatdatetime(b6,'dd/MM/yyyy hh:mm:ss')
The issue is the table grows by one each time and I'm not sure on how to reference the correct cell.
Hi @NiugeS :
Could you tell me how the 'add a row' action is set?
In addition, what is the value used to update columnB?
Best Regards,
Bof
When a ticket type is created in a database, it triggers the addrow. The value is CreatedDate.
I hope i've answered your questions. Apologies - a bit new to all of this still.
Hi @NiugeS :
Something like this?
If so,the Expression should be:
formatDateTime(triggerOutputs()?['body/Created'],'dd/MM/yyyy hh:mm:ss')
Best Regards,
Bof
@v-bofeng-msft Thanks for the help. I'm still trying to get this to work. There must be somethign wrong with the expression i'm doing as i'm getting One or more fields provided is of type 'Null', a different type is expected.
Without this expression, the flow works fine so something i'm doing wrong.
User | Count |
---|---|
92 | |
44 | |
20 | |
19 | |
15 |
User | Count |
---|---|
136 | |
54 | |
43 | |
42 | |
31 |