Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Get full month name

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');

1 Solution

Accepted Solutions
Highlighted
Not applicable

use date(fieldname,'MMMM') instead of month(fieldname)

View solution in original post

10 Replies
Highlighted
Not applicable

use date(fieldname,'MMMM') instead of month(fieldname)

View solution in original post

Highlighted
Not applicable

thanks to help me.

Highlighted
Not applicable

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.

Highlighted

Hi

     use Text(Date(AddMonths(vMaxDateVariable,1),'MMM'))

Celambarasan

Highlighted
Not applicable

Not only name of the month i want to store month number is seperate variable

Highlighted
Not applicable

You can also try using this:  Dual(Month(fieldname),date(fieldname,'MMMM')

Highlighted

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

Highlighted
Not applicable

it's working but when vMaxDateVariable is 12 i'm getting 2 instead of 1.

Highlighted

Hi,

     What Expression you used in this vMaxDateVariable?is it a date or only month?

Celambarasan