Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
StrToDate strange results, possible bug? |
Mon, Nov 19 2012 5:44 AM | Permanent Link |
Ivan Mihailov | See the following code:
var TempDate: DateTime; TempString: String; 1. FormatSettings.DateSeparator := '.'; FormatSettings.ShortDateFormat := 'dd.MM.yyyy'; TempString := '23.07.2012'; TempDate := StrToDate(TempString); ShowMessage(DateToStr(TempDate)); --> NaN.NaN.NaN 2. FormatSettings.DateSeparator := '-'; FormatSettings.ShortDateFormat := 'dd-MM-yyyy'; TempString := '23-07-2012'; TempDate := StrToDate(TempString); ShowMessage(DateToStr(TempDate)); --> 23-05--2013 3. FormatSettings.DateSeparator := '/'; FormatSettings.ShortDateFormat := 'dd/MM/yyyy'; TempString := '23/07/2012'; TempDate := StrToDate(TempString); ShowMessage(DateToStr(TempDate)); --> 23/07/2012 Only the third variant is ok Ivan Mihailov |
Mon, Nov 19 2012 3:34 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ivan,
<< See the following code: >> Yes, the date-parsing is having issues with decimal separators that also belong to floating-point numbers. I'll have a fix for this in the next build, which hopefully will be out in the next couple of days. Thanks, Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, January 20, 2025 at 05:58 AM | Privacy PolicySite Map © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |