I have a date field with format dd-mm-yyyy and a time field with hh:mm:ss and create a calculated field Start Date as DD-MM-YYYY T hh:mm:ss and also another calculate date field as End Date : Start Date + Time field(another time field)
This date value are meant to be push into date field of Sharepoint list item.
Please help, I'm struggling with the right expression
It depends on the sharepoint list column, If it is a string column, then no issues, it can be pushed, else if it is a DateTime column then you might put another step by the below expression
formatDateTime(variables(‘ReformattedDateTime’), ‘yyyy-MM-ddTHH:mm:ssZ’)
If you find this reply helpful, please consider giving it a LIKE AND
If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION
Cheers,
Srini
@Srini007 , thank you so much .
I was just wondering will this ReformattedDateTime will get pushed into Sharepoint list item ?
Try as below
Initialize variable: DateField = 13-05-2024
Initialize variable: TimeField = 10:00:00
Set variable: Day = split(variables('DateField'),'-')[0]
Set variable: Month = split(variables('DateField'),'-')[1]
Set variable: Year = split(variables('DateField'),'-')[2]
Set variable: Hour = split(variables('TimeField'),':')[0]
Set variable: Minute = split(variables('TimeField'),':')[1]
Set variable: Second = split(variables('TimeField'),':')[2]
Set variable: ReformattedDateTime = concat(variables('Day'), '-', variables('Month'), '-', variables('Year'), 'T', variables('Hour'), ':', variables('Minute'), ':', variables('Second'))
Output: ReformattedDateTime (2022-04-23T10:00:00)
If you find this reply helpful, please consider giving it a LIKE AND
If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION
Cheers,
Srini