Somu I had test with your code by substuting the input to hard coded value DateToString(DateFromDaysSince(-1,StringToDate("20060726","%yyyy%mm%dd"))) I am getting the result = 2006-07-25 which is what you would expect. Check whether your input is correct. You can cut and paste th...