Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return Quarter of last month
#4
Code:
Copy      Help
 
function str&lastMonthShort
DateTime pcDatum.FromComputerTime
pcDatum.AddMonths(-3) ;; calc september
lastMonthShort.from(val(pcDatum.ToStrFormat("{MM}")) pcDatum.ToStrFormat("{yy}"))

Hi guys,

could anybody please tell me how i can avoid that val takes the leading zero from MM (month in digits) in this Date function?
Output should be for example from january to september in 2021:
0121 to 0921. But at this point i get only 121 to 921.
(i modified AddMonths from -1 to -3 so we get september).

Many thanks

Achim


Messages In This Thread
Return Quarter of last month - by BoolTaxCoder - 11-14-2021, 09:34 AM
RE: Return Quarter of last month - by Kevin - 11-15-2021, 02:17 AM
RE: Return Quarter of last month - by BoolTaxCoder - 12-04-2021, 08:46 PM
RE: Return Quarter of last month - by Kevin - 12-04-2021, 09:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)