Compiler says Xojo.Date.FromText doesn't exist

Why does this error come up?

This is a desktop app for Mac and Windows.


You said Xojo.Date.FromText, maybe Core is missing (Xojo.Core.Date.FromText)$FromText

Core did it.

Now I have a variable and want to put a recordset field DateValue into it. How do I convert?

Use$ToText to have SQL Date Time format, or cut that to first 10 characters for SQL Date format.

That’s text not a date value.

Well I can’t find information about DateValue with Xojo.Core.Date only with regular Date. Like this.

Even Paul’s example in this thread used regular date then Xojo.Core.Date.

So, my question would be, why you need Xojo.Core.Date and not just Date?

Edit: other question, what database are you using?

Using SQLite and compiler complains Expected Class Xojo.Core.Date But got class Date

app.gdValidTo = rs.Field(“ValidTo”).DateValue

app.gdValidTo is Xojo.Core.Date

I using Xojo.Core.Date Throughout the code. Solutions???

app.gdValidTo is Xojo.Core.Date
rs.Field(“ValidTo”).DateValue is class Date

That’s why I asked why you need Xojo.Core.Date. And by that, I don’t mean it is a problem, only that you need to convert from/to Xojo.Core.Date to regular Date so you can use .DateValue

revert to classic date datatype… Xojo.Core.xxxx was a huge mistake in my opinion (and I think that of many others as well)

How do I do that, go from Date to Xojo.Core.Date?

Don’t… go the other way, as in remove “XOJO.CORE.”

I would like to try using core…

WHY?! its going away (read about API 2.0)

Yeah, I wouldn’t use the Xojo framework at this point unless I was forced to with iOS. Xojo has already announced that the Xojo framework is going to get rolled into the existing framework at some point in the future.

So, in reality, you’re making more work for yourself (or someone else) later on with you will have to convert from the (then) deprecated Xojo framework back to the global framework. My advice is to not bother with it right now.

None of the database classes have been converted over to use the Xojo framework (except in iOS for SQLite). The pain you’re going through is needless. I see zero benefit to using the Xojo framework functions unless you’re forced to use them. This is not the future proofing you’re hoping for.

Point taken, Thanks guys