From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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"))