DateTime.Now

From Xojo Documentation

Method

DateTime.Now(timezone As TimeZone = Nil) As DateTime

New in 2019r2

Supported for all project types and targets.

The current date and time (using the local timezone if timezone is Nil).

Sample Code

Get the current date and time:

Var d As DateTime = DateTime.Now

Get Berlin time:

Var d As DateTime = DateTime.Now(New TimeZone("Europe/Berlin"))