Hi all. This is probably a simple question for som...
# suiteanalytics
m
Hi all. This is probably a simple question for someone but would someone please be able to tell me how to get the week # of the year using a formula in a saved search. Any of the examples I'm finding don't seem to be supported or I'm using them wrong.
v
Hi there, I think you should be able to apply just a Week of Year function on your date result. For example, in my results I used the Date Created field, and set the Function to Week of Year, and my results for that now show the Year/Week # of that Year - i.e. 2019-5 , 2019-6
Here's how the results look when I run it:
message has been deleted
b
TO_CHAR({lastmodifieddate}, 'IW') or TO_CHAR({lastmodifieddate}, 'WW')
IW is Week of year (1-52 or 1-53) based on the ISO standard., WW is Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year.
m
Thanks, @Vtor that's a nice option to know it's there but the customer just wants the week number without the year.
@battk I think this is what I'm looking for but I keep getting Error:Invalid Expression....I'm using TO_CHAR({trandate},IW)
b
Quotes on IW
m
Yes!!!! Thank you!!!