Skip to content

Instantly share code, notes, and snippets.

@douglascayers
Created June 23, 2019 03:16
Show Gist options
  • Select an option

  • Save douglascayers/0622443af2cf31065c527300fe2d6f5f to your computer and use it in GitHub Desktop.

Select an option

Save douglascayers/0622443af2cf31065c527300fe2d6f5f to your computer and use it in GitHub Desktop.
Format Event Start Time in UTC in ISO-8601 Format (no dashes)
TEXT( YEAR( ActivityDate ) ) &
LPAD( TEXT( MONTH( ActivityDate ) ), 2, '0' ) &
LPAD( TEXT( DAY( ActivityDate ) ), 2, '0' ) &
'T' &
LPAD( TEXT( HOUR( TIMEVALUE( ActivityDateTime ) ) ), 2, '0' ) &
LPAD( TEXT( MINUTE( TIMEVALUE( ActivityDateTime ) ) ), 2, '0' ) &
LPAD( TEXT( SECOND( TIMEVALUE( ActivityDateTime ) ) ), 2, '0' ) &
'Z';
@douglascayers

Copy link
Copy Markdown
Author

@ankurkhetan2015

Copy link
Copy Markdown

Given an event start time of November 19th, 2019 at 8:00 PM CST, this formula is giving the output 20191119T020000Z (so changing the time based on UTC, while keeping the date in the same day format). What should we do in this scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment