Hello
I'm trying to save date from PowerApps to Excel and display the date in PowerApps.
First, I have set the column as Date Time format in Excel.
Sencond, the formula in PowerApps to save Date is as below:
If(StartsWith(Dropdown1.SelectedText.Value, "生产开始") && ProductForm.DisplayMode=DisplayMode.Edit,
Text(DateAdd(Now(), Value(First(Filter(BC_Time, SAP_TEXT = Gallery1.Selected.'SAP Code')).KeyTime), Minutes), "yyyy-mm-dd hh:mm"),Text(DateAdd(Gallery1.Selected.预计生产完成, -8 ,Hours),"yyyy-mm-dd hh:mm"))
Then, the date can be saved in Excel successfully as below:

Meanwhile I can view the date in PowerApps as below:

But when I refresh the Apps while I'm editing the other function, it shows error as below:

So I have to use DateTimeValue to switch the text as DateTime as below:

And now it saves the date in Excel as the second item in Excel:

And after I refresh the browse, PowerApps will say the Gallery1.Selected.预计生产完成 is DateTime. I have to delete the DateTimeValue again.
Why this happens? How to make it,Gallery1.Selected.预计生产完成, always be DateTime or Text?
