cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dgsonic
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

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

18 REPLIES 18
TschoofBAH
Advocate III
Advocate III

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

 

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

 

_T

TschoofBAH
Advocate III
Advocate III

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.

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.

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

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

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()).

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

@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
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

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (28,063)