[Qt-interest] how to get current time as timestamp format

Meir Yanovich meiry242 at gmail.com
Thu May 6 15:40:48 CEST 2010


yes you are right , my mistake

On Thu, May 6, 2010 at 4:37 PM, Andre Somers <andre at familiesomers.nl> wrote:

>  On 6-5-2010 15:28, Meir Yanovich wrote:
>
> yes is did search , didn't found any thing
>
> On Thu, May 6, 2010 at 4:11 PM, Andre Somers <andre at familiesomers.nl>wrote:
>
>>  On 6-5-2010 14:18, Meir Yanovich wrote:
>>
>> Hi
>> i try to get current time as timestamp without success
>> here is my code that returnes me  *Sunday, January 25th 1970, 03:17:35
>> (GMT)
>>
>>
>> QDateTime setTime = QDateTime::fromString (QString("1970-07-18T14:15:09"),
>> Qt::ISODate);
>> QDateTime current = QDateTime::currentDateTime();
>> uint msecs = setTime.time().msecsTo(current.time());
>>
>>  return  QString::number(msecs);
>> *
>>
>>   This was recently discussed on this list. Please search the archives
>> first.
>>
>>
> Are you trying to be funny?
> YOU started that thread! Subject was "how to get datetime as milliseconds
> ?" and you posted it April 21.
>
> André
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100506/ec9b19c7/attachment.html 


More information about the Qt-interest-old mailing list