How do defining the first and last day of the month

Whyexcelme

I have a question for you. Is there a chance to create a macro something similar to this, but in prco sql in quera where it always selects the first day and the last of the month.

%let thismonth=%sysfunc(putn(%sysfunc(today()),yymmn6.));

    where t1.DATE = &thismonth
        and _dly.  between t2.data_from and t2.data_to 
        and &gv_date_dly.  between t3.data_from and t3.data_to 
        and t3.obj_code not in ('G07','N06','N07') 

where we have date from to be recalled from the 1st day of the month and date_to to the last day of the month when the function & thismonth was called

draycut

Defining the first / last day of current month:

%let first = %sysfunc(intnx(month,%sysfunc(today()),0,b));
%let last  = %sysfunc(intnx(month,%sysfunc(today()),0,e));

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I find the first and last day of next month?

First and last day of a month

How to get first day of last month with Perl

The first day and the last day of the month

How do I get the last day of a month?

How to get first day and last day for every week in a month?

how to get the first day and last day of current month in python

How to add first day and last day of month in between query in sql?

How do i get the first and last day value per month in pandas?

how to solve this question when a day is set to the first day of the month and decremented, it should become the last day of the previous month?

Get the last day of the last month and the first day of next month in PHP

How to get First and Last Day of Previous Month with Carbon - Laravel

How to loop through first and last day of the current month in php?

How to get first and last day in specific week in month

how to get the first and last day of each month in a year?

How to retrieve first and last day of the previous month in Google BigQuery?

How to get first & last day of current week/month

How to get first and last day of month with IntlDateFormatter ( local calendar )

How to get last month's First day in iOS

First and last day of last month in Redshift

Get first and last day of last month?

If first day of the month take value for the last day of the month - Power BI

Generate dates starts with last day of a month and ends with first day of a month

How to get the last day of the month?

How do we get the date to the last Friday of the month when the last day of the month falls on a weekend

Filter on Date with PowerQuery for first and last day of month

Get the timestamp of the last and first day of a month in postgresSQL

Get the first and the last day of a month from the df

Retrieve first and last day of the month with Ruby (DateTime)