5 Replies Latest reply on Jun 27, 2016 4:37 AM by Sapir Tayri

# Current Month and Current Year

Hi,

I try to create a table with the current month and current year ( cumulative ) and can not put them both together ( only individually ) .

For exemple: June (2016) | 2016

How can i calculate them?

• ###### 1. Re: Current Month and Current Year

Hi Sapir

I have to admit I didn't know which you wanted, so I did them all

1

>> DATENAME('month',TODAY()) + " " + STR(YEAR(TODAY()))

2

>> DATENAME('month',TODAY()) + " " + "(" + STR(YEAR(TODAY())) + ")"

3

>> DATENAME('month',TODAY()) + " " + "(" + STR(YEAR(TODAY())) + ")" + " " + "|" + " " + STR(YEAR(TODAY()))

Hope that helps!

Cheers

Mark

• ###### 2. Re: Current Month and Current Year

Hi Mark,

Sorry if i didn't exeplain myself well enough...

I want two Columns: the first with sales of current month, and the second with sales of current year (2016).

Thank you,

Sapir

• ###### 3. Re: Current Month and Current Year

oh ok, sorry, quite different

Then you want this...

Current month >> IF DATEDIFF('month',[Date],TODAY())=0 THEN [Sales] ELSE NULL END

Current Year >> IF YEAR([Date]) = YEAR(TODAY()) THEN [Sales] ELSE NULL END

Cheers

Mark

1 of 1 people found this helpful
• ###### 4. Re: Current Month and Current Year

9.3.3 attached

1 of 1 people found this helpful
• ###### 5. Re: Current Month and Current Year

Thank you!