Results 1 to 2 of 2

Thread: can't get Qdate

  1. #1
    Join Date
    Aug 2009
    Posts
    38
    Thanks
    3

    Default can't get Qdate

    Hi,

    I have:
    QString comHora = lineaHora.left(6);

    comHora=100303

    If I do:

    QDate dia = QDate::fromString(comHora,"yyMMdd");
    hora->setText("Timess: " + dia.toString());

    It gives me:
    jue mar 3 1910

    I would like to get: 100303

    Could you help me please?
    Thanks

  2. #2
    Join Date
    Aug 2009
    Posts
    38
    Thanks
    3

    Default Re: can't get Qdate

    Well.

    I must put:

    hora->setText("Timess: " + dia.toString("yyMMdd"));


    Jejeje, I'm newbie!
    Sorry

Similar Threads

  1. QDate next day
    By AlexD in forum Qt Programming
    Replies: 2
    Last Post: 17th February 2010, 22:40
  2. Regarding QDate?
    By qtlinuxnewbie in forum Newbie
    Replies: 4
    Last Post: 5th February 2010, 07:02
  3. QDate::fromJulianDay
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2008, 19:49
  4. QDate Help pls
    By munna in forum Qt Programming
    Replies: 6
    Last Post: 8th May 2006, 06:50
  5. Two QDate issues
    By GreyGeek in forum Qt Programming
    Replies: 2
    Last Post: 8th March 2006, 02:09

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.