MS-Tech
14th November 2016, 14:17
Hallo Zusammen,
gibt es eine einfache Funktion, aus der ich z.B. den Monat, das Jahr etc aus einem tcdate extrahieren kann?
Viele Grüße
andreas.toepper
14th November 2016, 14:28
Ich nutze utc.to.date(..) dafür:
utc.to.date()
Syntax:
function long utc.to.date (long utc, ref long yearno, ref long monthno, ref long month_dayno, ref long hours, ref long minutes, ref long seconds)
Description
This converts a UTC long format value to the corresponding year, month, day, and so on, in local time.
Arguments
long utc
ref long yearno
ref long monthno
ref long month_dayno
ref long hours
ref long minutes
ref long seconds
bdittmar
14th November 2016, 15:01
Hallo Zusammen,
gibt es eine einfache Funktion, aus der ich z.B. den Monat, das Jahr etc aus einem tcdate extrahieren kann?
Viele Grüße
Hallo,
sprintf$()
Bsp.:
extern domain tcdate pdno.completed
dhlus500.year = val(sprintf$("%u(%04Y)",pdno.completed))
dhlus500.week = val(sprintf$("%u(%02W)",pdno.completed))
dhlus500.mont = val(sprintf$("%u(%02m)",pdno.completed))
Regards
MS-Tech
14th November 2016, 17:15
Hallo Zusammen,
danke für die Antworten.
Viele Grüße
MS-Tech