cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

time variable not grabbing hh:mm:ss

I have a textbox(txt_ReOpenedDate) storing a variable called the "TheVar"  being set to 

UpdateContext({TheVar: Now()})    

 

What i need :

When i need that value in txt_ReOpenedDate it is not grabbing the hh:mm:ss  ?

using  i.e. example in a patch formula

 

 opened_at: DateTimeValue(txt_ReOpenedDate.Text),  

 

Thanks

Dave

3 REPLIES 3
Super User III
Super User III

Hi @DAVIDPOWELL ,

If you just want hh:mm:ss

Text(Now(),"hh:mm:ss")

WarrenBelz_0-1614034595984.png

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

warren sorry i need the date also:

2021-02-22 16:19:18.940      for a sql server  field update.

 

The date in  txt_ReOpenedDate    looks like   2/22/2021 4:19 pm

 

when it patches back to sql server it needs to look like  2021-02-22 16:19:18.940

 

I dont think it will like the  "Text"

 

@DAVIDPOWELL ,

OK that is interesting as Now() should return the current date/time. I am unsure whether this will do the job as I am a SharePoint user and cannot test it, but try

DateTimeValue(
    Text(
        Now(),
        "[$-en]yyyy-mm-dd hh:mm:ss:fff"
    )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Top Solution Authors
Top Kudoed Authors
Users online (64,069)