Hello Everyone,
Requesting your assistance to identify the first and last day of a quarter using the date column.
Attached is the dummy input and output for your reference.
Date- 02/03/2024
OUTPUT Columns:
1. Period From (first day of the quarter) - 01/01/2024
2. Period To (last day of the quarter) - 03/31/2024
3. 1st month of the quarter - zero
4. 2nd month - copy the cwt amount
5. 3rd month - zero
6. Total - from 1st to 3rd month column.
Solved! Go to Solution.
check out the DateTime Functions like
DateTimeAdd
DateTimeFirstOfMonth
DateTimeLastOfMonth
DateTimeTrim(dt,t): Removes unwanted portions of a date-time and returns the modified date-time.
Parameters
dt: Date-time data expressed as a selected column or a specified date-time value between quotes.
t: Trim type. Options include:
firstofmonth: Trim to the beginning of the month (this does the same as month).
lastofmonth: Extend to one second before the end of the last day of the month.
Chris
@PassION_es one way of doing this