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 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 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
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (68,002)