function DateToStr(D: TDateTime): string; D: TDateTime to be converted Result: date as a string
This function will convert TDateTime format into "yyyy-mm-dd" string.