Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm runing below code it works fine.
SQLData:
//Concatenate (LatestMonth)
LOAD *,Month(DateTime) AS MonthName1
;
SQL SELECT *
FROM "Split Data".dbo."TempData_Date_JanToFeb"
Where
//DateTime >'2012-03-05 00:00:00.000'
DateTime > '$(vMaxDate)'
and datename(month,[datetime])='March'
But if i change it to
SQLData:
//Concatenate (LatestMonth)
LOAD *,Month(DateTime) AS MonthName1
;
SQL SELECT *
FROM "Split Data".dbo."TempData_Date_JanToFeb"
Where
//DateTime >'2012-03-05 00:00:00.000'
DateTime > '$(vMaxDate)'
and datename(month,[datetime])='$(vMonth)'
In variable vMonth name i'm getting name as Mar . I'm getting this from one of my previous loaded field by using peek function. How can i change it into fullname of month.
I'm using Month(fieldname) as MonthName
Let vMonth=Peek('MonthName');
use date(fieldname,'MMMM') instead of month(fieldname)
use date(fieldname,'MMMM') instead of month(fieldname)
thanks to help me.
i've a datefield with different number of dates. I'm catching the max date using peek function in a variable.
how can i get the next monthname in a variable. It should also be in the format March not as Mar
full name format i want to store in a variable.
Hi
use Text(Date(AddMonths(vMaxDateVariable,1),'MMM'))
Celambarasan
Not only name of the month i want to store month number is seperate variable
You can also try using this: Dual(Month(fieldname),date(fieldname,'MMMM')
Hi,
Yes you can use dual for this case.
=Dual(Date(AddMonths(vMaxDateVariable,1),'MMMM'),Month(AddMonths(vMaxDateVariable,1)))
Use Variable name to get Month Name and use Num(Variable name) to get month number
Celambarasan
it's working but when vMaxDateVariable is 12 i'm getting 2 instead of 1.
Hi,
What Expression you used in this vMaxDateVariable?is it a date or only month?
Celambarasan