Hello,
(Mac Yosemite, Xojo 2015r3.1)
following the docs, I convert an old-format date into a new format date:
dim d as new date
d = mFile.creationDate//get the creation date of a file
using xojo.core
Dim dateValue As Text = d.SQLDateTime.ToText
Dim dd As Date = Date.FromText(dateValue)//yellow triangle
dim d1 as new Date(dd.SecondsFrom1970, new TimeZone(0))//yellow triangle
Running Analyze Project, I get the word “Date” in dd and d1 highlighted, along with this warning:
“Before 2014r3, this would have referred to the Date class, but now etc.”
What should I do in order to avoid such warning?
Thanks.
Fully qualify the names
In mixed code I’d do that anyway as its easy to miss the “using clause” half way through the code that switches what “Date” means
dim d as new date
d = mFile.creationDate//get the creation date of a file
Dim dateValue As Text = d.SQLDateTime.ToText
Dim dd As xojo.core.Date = xojo.core.Date.FromText(dateValue)
dim d1 as new xojo.core.Date(dd.SecondsFrom1970, new xojo.core.TimeZone(0))