My system date time format is "dd-MM-yy". And in my db the date is stored like "04/12/12" when i try to convert the string to date using the following code i am getting exception
formatSettings := TFormatSettings.Create(LOCALE_SYSTEM_DEFAULT);
Result := StrToDateTime(sDateTime, formatSettings);
when i examined the format settings the ShortDateFormat is "dd/MM/yy" and the DateSeparator is coming as "-" but when i hard code my dateseperator to "/" it is working fine but is that the correct approach?