Error in documentation?

Can anyone tell me if this is a documentation error?

The code at http://documentation.xojo.com/api/deprecated/xojo.core.date.html#xojo-core-date-hour shows an example of :-

Var d As Date = Xojo.Core.Date.Now Var hour As Integer = d.Hour

However this gives a Type Mismatch error.

Without checking, shouldn’t that be:

Var d As Xojo.Core.Date = Xojo.Core.Date.Now

Date is DateTime in 2019r2+

To clarify, Date, Xojo.Core.Date and DateTime coexist in 2019r2+.

Right you are!
I expect though that Date <> Xojo.Core.Date

The original code works on iOS, which is the only place you should be using Xojo.Core.Date at this point. Still, I’ve updated the code sample to be more precise.

For desktop, you probably want to use DateTime instead.

Thanks Paul.

[quote=469614:@Paul Lefebvre]The original code works on iOS, which is the only place you should be using Xojo.Core.Date at this point. Still, I’ve updated the code sample to be more precise.

For desktop, you probably want to use DateTime instead.[/quote]