Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

What is the script to display 1st day of month?

Hi, I have a date field and I want to create another field which only has the 1st day of each month in it. How do I script it? Thanks.

1 Solution

Accepted Solutions

Re: What is the script to display 1st day of month?

Monthstart(your_date_field)

4 Replies

Re: What is the script to display 1st day of month?

Monthstart(your_date_field)

MVP
MVP

Re: What is the script to display 1st day of month?

Load

     Field1,

     Field2,

     ....

     YourDateField,

     MonthStart(YourDateField) as FirstDateofMonth

From.. xxxx

gupta_n8
Valued Contributor II

Re: What is the script to display 1st day of month?

Many ways are there:

>> monthstart

>> makedate(year(your_date_field),month(your_date_field),1)

>> date(MakeDate(your_date_field)-day(your_date_field)+1)

etc...

Best is to use QV function MONTHSTART

venkatasreekant
Valued Contributor

Re: What is the script to display 1st day of month?

Try this

Date(MonthStart([Fieldname],'DD/MM/YYYY')

Community Browser