Re: Last day of the month??
Posted in 1996
: let this_day = today : let day_str = this_day using "mm/dd/yyyy" : let mon_int = day_str[1,2] ### get month as integer : let yr_int = day_str[7,10] ### get year as integer : ### first day of this month below : let day_str = mon_int using "&&", "/01/", yr_int using "&&&&" : let g_start_date = day_str ### now have 1st of this month as DATE Probably a better way to do date manipulations is with the appropriate functions: MDY to create a date, given month, day, and year as integers DAY() to find the day of a date variable YEAR() to find the year MONTH() to find the month I always felt converting to a string and picking it apart was kind of a roundabout way of doing things. I saw another post that used UNITS addition/subtraction. This is probably innefficient also as it probably has to convert the dates DATETIME in order to do the arithmetic.