Skip to content

Instantly share code, notes, and snippets.

@garywu
Created June 26, 2017 17:43
Show Gist options
  • Save garywu/cc5009809d1813fdf55b64299656fcb8 to your computer and use it in GitHub Desktop.
Save garywu/cc5009809d1813fdf55b64299656fcb8 to your computer and use it in GitHub Desktop.
# for a date, returns 3 letter month and week number of the month
6/25/2017 -> JUN-W4
7/1/2017 -> JUN-W4
CONCATENATE(upper(text(A15-WEEKDAY(A15, 2)+1, "mmm")), "-W", INT((6+DAY(A15+1-WEEKDAY(A15-1)))/7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment