Results 1 to 5 of 5

Thread: QTime and QDate from String

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2014
    Posts
    7
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default QTime and QDate from String

    I have QString keeps dates like 2014-11-23 06:55:59
    I want to parse this QString to QDate and QTime.

    I've tried
    Qt Code:
    1. QDate myDate;
    2. myDate = QDate::fromString(qStr,"yyyy-MM-dd HH:mm:ss");
    To copy to clipboard, switch view to plain text mode 

    When i debug the code, i see QString value correctly, but mydate has no value. How can i fix it?
    Last edited by Eleasar; 11th February 2014 at 12:13.

Similar Threads

  1. QTime
    By dragon in forum Newbie
    Replies: 12
    Last Post: 16th February 2012, 10:40
  2. Help me qtime in qt?
    By tamnv110 in forum Newbie
    Replies: 7
    Last Post: 16th June 2011, 11:59
  3. QTime
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2009, 05:21
  4. Getting QDate from string
    By yagabey in forum Qt Programming
    Replies: 10
    Last Post: 17th February 2009, 15:40
  5. Extending QDate, QTime and QDateTime
    By jamadagni in forum Qt Programming
    Replies: 8
    Last Post: 24th March 2006, 15:51

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.