Getting unix time from TGNumberEntry

Hi,

I have couple widgets of type TGNumberEntry where a user can enter a date (m/d/y) in one, and a time (hh:mm:ss) in the other… I was wondering if TGNumberEntry had a method that allows me to get the unix time (seconds from 1970)…

I pretty much have:

TGNumberEntry *entryDate;
entryDate = new TGNumberEntry(parent, .005, 9, kENTRY1, TGNumberFormat::kNESMDayYear, TGNumberFormat::kNELNoLimits);
parent->AddFrame(entryDate, …)
TGNumberEntry *entryTime;
entryTime = new TGNumberEntry(parent, .005, 9, kENTRY1, TGNumberFormat::kNESHourMinSec, TGNumberFormat::kNELNoLimits);
parent->AddFrame(entryTime, …)

So then I can do entryDate->GetNumber() or entryTime->GetNumber(), but that returns some sort of integer that I don’t quite understand. What does it return, and how can I convert the combined date and time into unix time?

Thank you very much.

Hi,

Why not using these methods :

GetDate(Int_t& year, Int_t& month, Int_t& day) GetTime(Int_t& hour, Int_t& min, Int_t& sec)
Cheers,
Bertrand.

That did the trick. Thanks a lot.