Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Colin-Albert
Partner - Champion
Partner - Champion

Monthstart(your_date_field)

View solution in original post

4 Replies
Colin-Albert
Partner - Champion
Partner - Champion

Monthstart(your_date_field)

MK_QSL
MVP
MVP

Load

     Field1,

     Field2,

     ....

     YourDateField,

     MonthStart(YourDateField) as FirstDateofMonth

From.. xxxx

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Try this

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