Re: [Gambas-user] Format function changes date value
Brought to you by:
gambas
|
From: Gianluigi <bag...@gm...> - 2018-05-19 13:08:47
|
I think it depends on your version of Gambas, I get the correct result with the master: Dim zTestDate As String Dim zTestResult As String zTestDate = "5/4/2018" zTestResult = Format(CDate(zTestDate), "mm/dd/yy ddd") Debug "Test date: " & zTestDate & " Formatted: " & zTestResult '' Result: Main.Main.9: Test date: 5/4/2018 Formatted: 05/04/18 ven Regards Gianluigi 2018-05-19 14:54 GMT+02:00 George <ga...@ge...>: > When using the Format function to format a date, the date gets offset by 1 > day. Here's an example: > > Dim zTestDate As String > Dim zTestResult As String > zTestDate = "5/4/2018" > zTestResult = Format(CDate(zTestDate), "mm/dd/yy ddd") > Debug "Test date: " & zTestDate & " Formatted: " & zTestResult > > Result: Test date: 5/4/2018 Formatted: 05/03/18 Thu > > This seems to have started since the last update was applied. > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-user > |