updated code for timestamp in format "YYYY-MM" to create a timestamp in required format