CFDateMBS shared methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to CFDateMBS class.

CFDateMBS.NewDate(date as date, timeZone as CFTimeZoneMBS = nil) as CFDateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates a Xojo date from CFDate with given time zone.
Example
// Xojo now
dim d as new date
// convert to CFDate in UTC
dim c as CFDateMBS = CFDateMBS.NewDate(d, nil)
// and convert back
dim x as date = c.Date(nil)

// compare in debugger
dim ds as string = d.SQLDateTime
dim dx as string = x.SQLDateTime

// and with current time zone
dim dx2 as string = c.Date(SystemCFTimeZoneMBS).SQLDateTime

Break

If time zone is nil, we use UTC.

See also:

CFDateMBS.NewDate(date as dateTime, timeZone as CFTimeZoneMBS = nil) as CFDateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreFoundation MBS MacCF Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Xojo dateTime from CFDate with given time zone.

If time zone is nil, we use UTC.

See also:

CFDateMBS.Now as CFDateMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreFoundation MBS MacCF Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates new date object with current timestamp.
Example
dim d as CFDateMBS = CFDateMBS.now
MsgBox d.date.SQLDateTime

The items on this page are in the following plugins: MBS MacCF Plugin.


💬 Ask a question or report a problem