12-04-2021, 08:46 PM
(This post was last modified: 12-04-2021, 08:47 PM by BoolTaxCoder.
Edit Reason: modified comment in code
)
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