Mar 9, 2012 #1 MLNorton Programmer Nov 15, 2009 134 US String to Date conversion in Delphi 2007 fails. Var X: string; MyDate: TDateTime: begin X := '07/03/2012'; MyDate := StrToDate(QuotedStr(X)); End; The Error states that ‘07/03/2012’ is not a valid date. What is my problem?
String to Date conversion in Delphi 2007 fails. Var X: string; MyDate: TDateTime: begin X := '07/03/2012'; MyDate := StrToDate(QuotedStr(X)); End; The Error states that ‘07/03/2012’ is not a valid date. What is my problem?
Mar 9, 2012 #2 DjangMan Programmer Jun 1, 2001 1,785 CA Try putting a showmessage with a formatdate function for the same date. I wonder if your date format is not using slashes. Upvote 0 Downvote
Try putting a showmessage with a formatdate function for the same date. I wonder if your date format is not using slashes.
Mar 10, 2012 #3 imex Programmer Feb 28, 2011 203 BR Try removing the function QuotedStr: Code: MyDate := StrToDate(X); I hope this helps. Imobiliárias em Guarulhos Upvote 0 Downvote
Try removing the function QuotedStr: Code: MyDate := StrToDate(X); I hope this helps. Imobiliárias em Guarulhos