Results 1 to 3 of 3

Thread: QDateTime Invalid

  1. #1
    Join Date
    Apr 2008
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default QDateTime Invalid

    QDateTime dateTime = QDateTime::fromString("04", "dd"); //Valid
    QDateTime dateTime = QDateTime::fromString("Mon", "ddd"); //Valid
    QDateTime dateTime = QDateTime::fromString("04 Mon", "dd ddd"); //Invalid

    Why invalid?

  2. #2
    Join Date
    Apr 2008
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDateTime Invalid

    problem resolved.

  3. #3
    Join Date
    Oct 2007
    Location
    Warminster, England
    Posts
    31
    Thanks
    17
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QDateTime Invalid

    How did you solve the problem?
    I am using the following code, and getting an invalid date, but can't see why.
    Qt Code:
    1. QDateTime startdate;
    2. startdate = QDateTime( QDate::fromString("01 Jan 2009","dd MMM YYYY"));
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 12:20
  2. problem with forward declaration
    By MarkoSan in forum General Programming
    Replies: 14
    Last Post: 6th January 2008, 21:45
  3. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  4. Replies: 1
    Last Post: 30th June 2006, 05:24
  5. Qtopia cross-compile for arm
    By Bitz in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 12th June 2006, 12:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.