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

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (35,924)