YYYY.MM.DD ist keine gültige alphanumerische Darstellung eines Datums!

Gültige Formate sind: YYYY-MM-DD, DD.MM.YYYY, MM/DD/YYYY

... und was die wenigsten wissen: 'YYYYMMDDHHMMSS' wird als gültiges Format angesehen, d.h. das Datum einfach nach alpha konvertieren und 6 Nullen dranhängen und schon funktionierts.

Das folgende Beispiel funktioniert:
Code:
 D MyDate          S              8P 0 inz(20121011)                      
                                                                          
 D DSTS            DS                                                     
 D   MyTS                        14A                                      
 D   MyDateA                      8A   Overlay(MyTS)                      
 D   MyTimeA                      6A   Overlay(MyTS: *Next) inz('000000') 
                                                                          
 D MyWeekDay       S              1P 0                                    
 D MyWeekISO       S              3P 0                                    
 *---------------------------------------------------------
 /Free
    MyDateA = %EditC(MyDate: 'X'); 
    Exec SQL  Set (:MyWeekDay, :MyWeekIso) = (DayOfWeek_ISO(:MyTS),   
                                              Week_ISO(Date(:MyTS))); 
    Dsply MyWeekDay;                                                  
    Dsply MyWeekISO;  
    *INZSR = *On                                                
 /End-Free