Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 19 Nov 2004 @ 14:05:14 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Fastload logs date format
 
From:   Geoffrey Rommel

  The date is like "Tue Jul 13 16:01:52 2004". This is the date format spread across in the logs created as a result of running a fastload or fastexport script.  


This may not be the answer you're looking for, but this sounds like a job for Perl.

# First set up this hash:

     %Monaten = qw/Jan 1 Feb 2 Mar 3 Apr 4 May 5 Jun 6 Jul 7 Aug 8
       Sep 9 Oct 10 Nov 11 Dec 12/;

# Then, for each line to be transformed:

     ($heb, $mens, $dies, $tempus, $annus) = split;
     $mnum = $Monaten{$mens} || 0;
     $tstamp = sprintf( "%04d-%02d-%02d %s\n", $annus, $mnum, $dies, $tempus );


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023