Hallo Marco,
welches Datum meinst du?
Das aktuelle Datum oder das Datum der Datei (file_systime)?
Hier ein Beispiel für beides :
(defun dtm ( / akt_datum file_systime file_datum)
(setq akt_datum (menucmd "M=$(edtime,$(getvar,date),DD.MO.YY)"))
(princ (strcat "\n Aktuelles Datum = " akt_datum))
;
(vl-load-com)
(setq file_systime (vl-file-systime "C:/Programme/Autodesk/MDT6/acad.exe")
file_datum (strcat (txt-2-stellig (nth 3 file_systime)) "." ; Tag
(txt-2-stellig (nth 1 file_systime)) "." ; Monat
(txt-2-stellig (nth 0 file_systime)))) ; Jahr
(princ (strcat "\n File Datum = " file_datum))
(princ)
)
; --------------------------------------
(defun txt-2-stellig (Zahl / tmp)
(setq tmp (strcat "0" (itoa Zahl)))
(substr tmp (1- (strlen tmp)))
)
; --------------------------------------
Helmut
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP