SOLVED
Date Time Parse from year and week number
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
MikeLR
8 - Asteroid
‎11-17-2020
12:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all
I'm slightly surprised that this formula gives -01-01 as the day and month for all weeks.
Any ideas on what I'm doing wrong please?
Thanks
Mike
Solved! Go to Solution.
6 REPLIES 6
16 - Nebula
‎11-17-2020
12:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apparently %W is not supported for a datetimeparse()
AngelosPachis
16 - Nebula
‎11-17-2020
12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ACE Emeritus
‎11-17-2020
12:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
%W can only be used in DateTimeFormat not in DateTimeParse.
Something like:
DateTimeAdd(
DateTimeAdd(LEFT([Fiscal Week Number],4) + '-01-01',
-ToNumber(DateTimeFormat(LEFT([Fiscal Week Number],4) + '-01-01', '%w')),
"days"),
7 * ToNumber(Right([Fiscal Week Number],2)), "days")
should be close to what you need.
‎11-17-2020
02:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@PhilipMannering
Ok thanks for confirming
‎11-17-2020
02:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@AngelosPachis Thanks for the link, that's a useful solution
‎11-17-2020
02:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jdunkerley79 That works a treat thanks. Now I just need to make sure I understand exactly what it's doing 🙂
