I am trying to write a date in "dd-mm-yyyy" format in excel sheet thru excel-vba. I achieved it using [a2].CurrentRegion.Columns("k").NumberFormat = "dd-mm-yyyy”
and my cell value comes out to be 17-02-2021 , which is good.....
But there is some weird problem... Since I have to iterate the startDate for whole month by everytime adding it by 1, so the next value comes out to be 02-01-2021 instead of 01-02-2021 until 12th of each month 12-02-2021 and from 13th, the month is again changing to two digits 13-02-2021
Bookmarks