
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get Month number
Greetings:
I'm having a problema getting the month number that is today. I have my expression like this:
SUM({<[Mes Num]= {'$(=
if(Month(Date(Today()-1))='ene.',1,
if(Month(Date(Today()-1))='feb.',2,
if(Month(Date(Today()-1))='mar.',3,
if(Month(Date(Today()-1))='abr.',4,
if(Month(Date(Today()-1))='may.',5,
if(Month(Date(Today()-1))='jun.',6,
if(Month(Date(Today()-1))='jul.',7,
if(Month(Date(Today()-1))='ago',8,
if(Month(Date(Today()-1))='sep.',9,
if(Month(Date(Today()-1))='oct.',10,
if(Month(Date(Today()-1))='nov.',11
if(Month(Date(Today()-1))='dic.',12)))))))))))))'}
>}Venta)
But it doesn't return the month value, it's blank.
What's wrong with my expression?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the function Month returns dual value.
so you shouldnt need to do the if statements mentioned. you should just need Num(Month(Today()-1))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the function Month returns dual value.
so you shouldnt need to do the if statements mentioned. you should just need Num(Month(Today()-1))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, it worked without issues.
Thanks a lot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
no problems
