cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
Super User III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,706)