web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Now format

(1) ShareShare
ReportReport
Posted on by 522

Hi

 

I have a text field in sharepoint, with a date/time:   IDS      29-04-2023 07:00:00

 

I have to compare this field with Now().

 

If(DateTimeValue(ThisItem.IDS)<Now();3;2))

 

This is wowrking okay in my country, but we have some users in other countries.

 

So I'am trying to format Now.

 

If(DateTimeValue(ThisItem.IDS)<Text(Now(); "dd-mm-yyyy hh:mm:ss");3;2))

 

If(ThisItem.IDS<Text(Now(); "dd-mm-yyyy hh:mm:ss");3;2))

 

If(Text(DateTimeValue(ThisItem.IDS);"dd-mm-yyyy hh:mm:ss")<Text(Now(); "dd-mm-yyyy hh:mm:ss");3;2))

 

But none is working ?

 

Tony

 

 

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    Recommend to try to keep the date and time always in UTC including when storing it in SharePoint, see if that helps @Thansson 

    If
    (
     DateTimeValue(ThisItem.IDS) < DateAdd(Now(),TimeZoneOffset(),TimeUnit.Minutes), 
     3, 2
    )
    
    

    The following formula is the one that converts the given time to UTC:

    DateAdd(Now(),TimeZoneOffset(),TimeUnit.Minutes)

     

  • Verified answer
    Thansson Profile Picture
    522 on at

    Hi @poweractivate 

     

    Thank you for your answer.

     

    I Can't use UTC,   the field IDS is text format, and the user are placed around in europe.

     

    This one seems to work:

     

    If(DateTimeValue(Text(ThisItem.IDS;"dd-mm-yyyy hh:mm:ss"))<DateTimeValue(Text(Now();"dd-mm-yyyy hh:mm:ss"));3;2))

     

    Tony

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard