cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vjcaldeira1
Frequent Visitor

datetime

HI!! I

need save a field that have date , hour ,minutes and seconds. when a put this cod Text(Now();"[$-pt-BR]yyy-mm-dd hh:mm:ss")) be with error because is a text and  my field is date time.
when I put this DateTimeValue(Text(Now();"[$-pt-BR]yyy-mm-dd hh:mm:ss"))), be without seconds.

Someone Can I help me ??

thanks a lot

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @vjcaldeira1 ,

Do you want to update to datetime type field with this format "yyy-mm-dd hh:mm:ss"?

Actually, this is the setting of your data source.

Could you tell me what is your data source?

If it is sharepoint list, I'm afraid it's not supported to display date time with this format "yyy-mm-dd hh:mm:ss".

In sharepoint list, date time value could only include year,month,date,hour and minute.

10211.PNG

 

If you insist in updating with second value, I suggest you do not use date time value, changing to text type field.

You could text type field with whatever time format that you want.

Use formula like this to update:

Text(Now();"[$-pt-BR]yyy-mm-dd hh:mm:ss")

 

 

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
RandyHayes
Super User
Super User

@vjcaldeira1 

Date values have no format.  Format is dependent on your locale when displaying a date.  But they are always saves in a numeric data value format (that you should not concern yourself with).

So, point being...if you want to store the current date and time, then simply use the Now() function.

 

Then when you go to display that value, then you can use the Text functions to display in the way that you want.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
v-yutliu-msft
Community Support
Community Support

Hi @vjcaldeira1 ,

Do you want to update to datetime type field with this format "yyy-mm-dd hh:mm:ss"?

Actually, this is the setting of your data source.

Could you tell me what is your data source?

If it is sharepoint list, I'm afraid it's not supported to display date time with this format "yyy-mm-dd hh:mm:ss".

In sharepoint list, date time value could only include year,month,date,hour and minute.

10211.PNG

 

If you insist in updating with second value, I suggest you do not use date time value, changing to text type field.

You could text type field with whatever time format that you want.

Use formula like this to update:

Text(Now();"[$-pt-BR]yyy-mm-dd hh:mm:ss")

 

 

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
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,170)