Formated Output and file creation time
    Vino.B via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Wed Aug 16 08:30:18 PDT 2017
    
    
  
Hi,
  I have a small program which will list the file names, size and 
creation date and time, the output of the program is as below and 
required your help to print the output as per "Required Output"
Current Output
C:\Test1\Test2\TXXXXXXXXXXXXXXXX.txt 1234 2017-Aug-16 
19:10:54.0618385
C:\Test1\Test2\TXXXXXXXXX.txt 1234 2017-Aug-16 19:10:54.0618385
C:\Test1\Test2\TXXX.txt 1234 2017-Aug-16 19:10:54.0618385
Required Output
(1) Alain in Table Format like below
(2) Remove the msec from the date part (0618385)
C:\Test1\Test2\TXXXXXXXXXXXXXXXX.txt   1234   2017-Aug-16 19:10:54
C:\Test1\Test2\TXXXXXXXXX.txt          1234   2017-Aug-16 19:10:54
C:\Test1\Test2\TXXX.txt                1234   2017-Aug-16 19:10:54
I tried the below but no luck
writefln("%s %10d %10s", d, d.size, d.timeCreated());
From,
Vino.B
    
    
More information about the Digitalmars-d-learn
mailing list