cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Eastern Time Zone Using Now() Function

How do i get a Eastern Time using the Now Function.  When we execute the Now function what is the default time zone.  How can i define the time for a particular time zone. Currently i get mm/dd/yyyy  time / am.  

 

Also the time is showing AM and it should be PM for where I'm located.

 

Derek

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Eastern Time Zone Using Now() Function

If you timestamp your records in UTC, the date/time displayed should reflect the timezone of the user viewing the data. So someone in PST or EST would see the date/time in their respective timezone.

 

To get the UTC timestamp, use the fomula: Text(Now(), UTC)

 

If you store that as text, you will need to use the "DateTimeValue" formula when displaying the value.

 

In the example below, you can see the result.

  1. OnSelect of the button, the formula is "UpdateContext({now: Text(Now(), UTC)})"
  2. The first textbox is just displaying the context I stored previously ("now")
  3. The last textbox uses displays the value stored in "now"; "DateTimeValue(now)"

 

Sample.png

 

 

Ryan McHenry [MSFT - PowerApps]

View solution in original post

Highlighted
Power Apps
Power Apps

Re: Eastern Time Zone Using Now() Function

18 REPLIES 18
Highlighted
Advocate III
Advocate III

Re: Eastern Time Zone Using Now() Function

https://powerapps.microsoft.com/en-us/tutorials/function-now-today-istoday/

 

"All these functions work in the TimeZone of the current user."

 

_T

Highlighted
Advocate III
Advocate III

Re: Eastern Time Zone Using Now() Function

Now, if you wanted to change what time is displayed in your app (or used) you could create a variable (not context, you want it to go through different screens) and call it zone. Could then create a collection tz that contains a name and value column. Names would be TimeZones, value would be how many hours ahead or behind your time zone they are. You could then use a dropdown selection to select one of the items in the collection and use that selection value with the DateAdd() function to adjust the time that Now() returns.

Highlighted
Advocate I
Advocate I

Re: Eastern Time Zone Using Now() Function

But isn't there an easier way to Increase or Decrease the time. I want to Add/Subtract time from the NOW function to make a time PST, Mountain, Central or Eastern time zone.  Is there a simple function to do that.

 

When i run the Now() function i'm getting AtanticTime on all my timestamps so i want to decrease the time by 4 hours for Pacific Time Zone. How would i timestamp my records using the NOW function and get a PST time when the default is Atlantic Time zone.

 

Derek.

Highlighted
Power Apps
Power Apps

Re: Eastern Time Zone Using Now() Function

If you timestamp your records in UTC, the date/time displayed should reflect the timezone of the user viewing the data. So someone in PST or EST would see the date/time in their respective timezone.

 

To get the UTC timestamp, use the fomula: Text(Now(), UTC)

 

If you store that as text, you will need to use the "DateTimeValue" formula when displaying the value.

 

In the example below, you can see the result.

  1. OnSelect of the button, the formula is "UpdateContext({now: Text(Now(), UTC)})"
  2. The first textbox is just displaying the context I stored previously ("now")
  3. The last textbox uses displays the value stored in "now"; "DateTimeValue(now)"

 

Sample.png

 

 

Ryan McHenry [MSFT - PowerApps]

View solution in original post

Highlighted
Power Apps
Power Apps

Re: Eastern Time Zone Using Now() Function

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Eastern Time Zone Using Now() Function

Hi @Ryanmch,

 

I'm trying to write local time to a Date/Time field in an Access custom web app (Azure sql database) and Text(Now(), UTC) doesn't seem to work.

 

I'm based in Melbourne and trying to save UTC+11 time. Text(Now(), UTC) function converts local time to UTC time as expected but also shows UTC time in Access web app and PowerBI instead of the local time. 

 

Therefore I tried using Text(Now(), Local) and it always results in word 'local' instead of the local time. So data won't get written into the field. 

 

Appreciated if you could help resolve this issue. Thanks

Highlighted
Advocate III
Advocate III

Re: Eastern Time Zone Using Now() Function

Afernando, if you read Raynmch's post above, you will need to use the DateTimeValue() function to reset the Text(Now, UTC) to local time. If you have no use for the UTC time, then just use Text(Now()).

Highlighted
Advocate III
Advocate III

Re: Eastern Time Zone Using Now() Function

I just re-read your question, this is not an Access Web App forum. This forum is for PowerApps, a different beast.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Eastern Time Zone Using Now() Function

@TschoofBAH

 

I think you don't understand English properly. The root cause of my problem is not AWA but PowerApps. If you don't know the answer to a question please stay away without spamming. 

 

Cheers.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,117)