QDateTime

#include <QtCore/QDateTime>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QDateTime


Overview

Public Functions Index

QDateTime ()
QDateTime (const QDate &)
QDateTime (const QDate &, const QTime &, Qt::TimeSpec spec=Qt::LocalTime)
QDateTime (const QDateTime &other)
~QDateTime ()
QDateTimeaddDays (int days) const
QDateTimeaddMonths (int months) const
QDateTimeaddMSecs (qint64 msecs) const
QDateTimeaddSecs (int secs) const
QDateTimeaddYears (int years) const
QDatedate () const
intdaysTo (const QDateTime &) const
boolisNull () const
boolisValid () const
qint64msecsTo (const QDateTime &) const
booloperator!= (const QDateTime &other) const
booloperator< (const QDateTime &other) const
booloperator<= (const QDateTime &other) const
QDateTime &operator= (const QDateTime &other)
booloperator== (const QDateTime &other) const
booloperator> (const QDateTime &other) const
booloperator>= (const QDateTime &other) const
intsecsTo (const QDateTime &) const
voidsetDate (const QDate &date)
voidsetMSecsSinceEpoch (qint64 msecs)
voidsetTime (const QTime &time)
voidsetTime_t (uint secsSince1Jan1970UTC)
voidsetTimeSpec (Qt::TimeSpec spec)
voidsetUtcOffset (int seconds)
QTimetime () const
Qt::TimeSpectimeSpec () const
QDateTimetoLocalTime () const
qint64toMSecsSinceEpoch () const
QStringtoString (Qt::DateFormat f=Qt::TextDate) const
QStringtoString (const QString &format) const
uinttoTime_t () const
QDateTimetoTimeSpec (Qt::TimeSpec spec) const
QDateTimetoUTC () const
intutcOffset () const

Static Public Functions Index

QDateTimecurrentDateTime ()
QDateTimecurrentDateTimeUtc ()
qint64currentMSecsSinceEpoch ()
QDateTimefromMSecsSinceEpoch (qint64 msecs)
QDateTimefromString (const QString &s, Qt::DateFormat f=Qt::TextDate)
QDateTimefromString (const QString &s, const QString &format)
QDateTimefromTime_t (uint secsSince1Jan1970UTC)

Public Functions

QDateTime ()

QDateTime (

QDateTime (

QDateTime (

~QDateTime ()

Destructor.

QDateTime addDays (
  • intdays)

QDateTime addMonths (
  • intmonths)

QDateTime addMSecs (
  • qint64msecs)

QDateTime addSecs (
  • intsecs)

QDateTime addYears (
  • intyears)

QDate date ()

int daysTo (

bool isNull ()

bool isValid ()

qint64 msecsTo (

bool operator!= (

bool operator< (

bool operator<= (

QDateTime & operator= (

bool operator== (

bool operator> (

bool operator>= (

int secsTo (

void setDate (

void setMSecsSinceEpoch (
  • qint64msecs)

void setTime (

void setTime_t (
  • uintsecsSince1Jan1970UTC)

void setTimeSpec (
  • Qt::TimeSpecspec)

void setUtcOffset (
  • intseconds)

QTime time ()

Qt::TimeSpec timeSpec ()

QDateTime toLocalTime ()

qint64 toMSecsSinceEpoch ()

QString toString (
  • Qt::DateFormatf)

QString toString (

uint toTime_t ()

QDateTime toTimeSpec (
  • Qt::TimeSpecspec)

QDateTime toUTC ()

int utcOffset ()

Static Public Functions

QDateTime currentDateTime ()

QDateTime currentDateTimeUtc ()

qint64 currentMSecsSinceEpoch ()

QDateTime fromMSecsSinceEpoch (
  • qint64msecs)

QDateTime fromString (
  • const QString &s,
  • Qt::DateFormatf )

QDateTime fromString (

QDateTime fromTime_t (
  • uintsecsSince1Jan1970UTC)

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus