StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Example_DateTime.C
1 // $Id: Example_DateTime.C,v 1.1 1999/12/07 22:00:30 kathy Exp $
2 // $Log: Example_DateTime.C,v $
3 // Revision 1.1 1999/12/07 22:00:30 kathy
4 // new example macro showing how to get date and time so I won't have to figure it out again
5 //
6 //=======================================================================
7 // owner: Kathy Turner
8 // what it does:
9 // Shows how to get the date and time
10 //=======================================================================
11 
12 void Example_DateTime()
13 {
14 
15  TDatime now;
16  Int_t ndate=now.GetDate();
17  Int_t ntime=now.GetTime();
18  cout << " DATE = " << ndate << " TIME = " << ntime << endl;
19 
20  TDatime kathy;
21  const Char_t *amy = kathy.AsString();
22  cout << " Date & Time: " << amy << endl;
23 
24 
25 }
26 
27 
28 
29