cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
EC_1
Level: Powered On

Formate Date Problem/Formato de fecha incorrecto

I have a problem with the date, it supposed that when i complete de form it has to submit all the data, but when i check the description page it shows a different date format and this is causing me problems in the database cause all the dates are in different formats 


La fecha que tengo en la pantalla de registro tiene un formato pero cuando envio el regsitro el formato de fecha cambia y esto provoca que en la tabla donde guardo los regsitros tengo formatos diferentes y no los puedo filtrar

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Formate Date Problem/Formato de fecha incorrecto

Hi @EC_1 ,

Do you mean that when you submit data, the date format is not the same?

Firstly, I suggest you use datepicker control to choose date, which could make sure that all the date being the same format.

Please do not set the datepicker's IsEditable to true, which will lead to the format problem too.

 

Secondly, could you tell me the field's data type that you want to update?

I suggest you format the date data to the same format when updating.

Usually, we use Text function to format data and use DateValue function to change value's data type to datevalue.

If the field is date type, you could use this formula:

Patch(table,Defaults(table),{datefield:DateTimeValue(Text(datevalue,"mm/dd/yyyyy"))})

If the field is date time type, you could use this formula:

Patch(table,Defaults(table),{datefield:DateTimeValue(Text(datevalue,"mm/dd/yyyyy"))})

Here are docs about Text and datevalue for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datevalue-timevalue

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
goobernoodles
Level: Powered On

Re: Formate Date Problem/Formato de fecha incorrecto

What data source are you using?  If it's SQL check this out:  https://powerapps.microsoft.com/en-us/blog/working-with-datetime-values-in-sql/

Community Support Team
Community Support Team

Re: Formate Date Problem/Formato de fecha incorrecto

Hi @EC_1 ,

Do you mean that when you submit data, the date format is not the same?

Firstly, I suggest you use datepicker control to choose date, which could make sure that all the date being the same format.

Please do not set the datepicker's IsEditable to true, which will lead to the format problem too.

 

Secondly, could you tell me the field's data type that you want to update?

I suggest you format the date data to the same format when updating.

Usually, we use Text function to format data and use DateValue function to change value's data type to datevalue.

If the field is date type, you could use this formula:

Patch(table,Defaults(table),{datefield:DateTimeValue(Text(datevalue,"mm/dd/yyyyy"))})

If the field is date time type, you could use this formula:

Patch(table,Defaults(table),{datefield:DateTimeValue(Text(datevalue,"mm/dd/yyyyy"))})

Here are docs about Text and datevalue for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datevalue-timevalue

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,296)