Minus 62 days from Current_Date but need 1st day of the mont
Posted: Thu Jan 16, 2014 6:26 am
I'm using following code to get minus -62days of the current date :
The output I'm getting is
pPeriodStartDate= 20131115
20131115 -62days
Now I need '01' instead of '15' , meaning 1st day of the month so it should be like 20131101 instead of 20131115 or
Replace the 'dd' value to constant value '01'
Many thanks in advance
Kind regards
Farhan
Code: Select all
Ereplace(Oconv(iconv(DSJobStartDate,"D-YMD")-62,"D-YMD[4,2,2]"),"-","")
pPeriodStartDate= 20131115
20131115 -62days
Now I need '01' instead of '15' , meaning 1st day of the month so it should be like 20131101 instead of 20131115 or
Replace the 'dd' value to constant value '01'
Many thanks in advance
Kind regards
Farhan