Re: Querry

From: Kevin Lynch <krlynch_at_bu.edu>
Date: Wed, 30 Aug 2006 15:58:02 -0400


With respect, it doesn't look to me like TDatime has the functionality the original poster is looking for, at least as of 5.12. It sounds more like he needs the equivalent of the ANSI C functions strftime/strptime.

I'm surprised that TDatime doesn't already wrap that functionality, since it seems to be a minimally disguised wrapper around the standard time_t type. It wouldn't be too hard for someone (such as the original poster, now that he has a pointer to strftime :-) to add that functionality to TDatime with a few hours of work and testing.

Rene Brun wrote:
> See class TDatime:
> http://root.cern.ch/root/htmldoc/TDatime.html
>
> eg:
> TDatime t;
> t.AsString()
>
> Rene Brun
>
> Satya J wrote:
>

>> Hi,
>>
>> kindly suggest me how I can convert current date and time into a 
>> string variable in root. I need this string in different format like
>>
>> current time; 11:51pm  30th Aug'06
>> I want           2006/08/30/23/51 or 2006:08:30:23:51
>>    &              200608302351
>> into a char string. Can it possible?
>>
>> Your suggestion are highly apreciated.
>> Satya


-- 
-------------------------------------------------------------------------------
Kevin Lynch				voice:	(617) 353-6025
Physics Department			Fax: (617) 353-9393
Boston University			office:	 PRB-361
590 Commonwealth Ave.			e-mail:	 krlynch_at_bu.edu
Boston, MA 02215 USA			http://budoe.bu.edu/~krlynch
-------------------------------------------------------------------------------
Received on Wed Aug 30 2006 - 21:58:13 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET