cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lourenacdm
Helper III
Helper III

Date field change the text value when save in sql

I want to clear a doubt, because I don't know if it makes sense.

We created an application and passed the date from ts_save to text in the following format Text(now(); "dd/mm/yyyy hh:mm:ss"), but we noticed that when some people save the form the date appears totally different from day, for example, I save the form on the date of 24/08/2021 and the date of 2022/09/25 appears, for example.

We notice that if we put the date to Text(Now(); "yyyy-mm-dd hh:mm:ss") the date appears correctly when save.

I don't know if it's related to the date format or to Now(), because we did a test now we put a date manually and put another field to save the chosen date to do the test
Text(ThisItem.data_boa; "dd/mm/yyyy hh:mm:ss") and the error does not occur

1 REPLY 1
timl
Super User
Super User

Hi @Lourenacdm 

Assuming that the data type of your field is a date type column in SQL Server, I would recommend that you save the value Now(), rather than convert Now() to text when you save your record. This should hopefully resolve these problems.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,948)