Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Could not convert a Num-'Date' (eg. 43881) correctly and add a time. Would like to have this format: 'YYYY-MM-DD hh:mm:ss'. (see below output Timestamp1). See below all my trials.
Load
%DatumId,
Date(%DatumId, 'DD.MM.YYYY') as Format1,
Date(Num(%DatumId, 'DD.MM.YYYY')) as Format2,
Date(Num#(%DatumId,'#####'), 'DD.MM.YYYY') as Format3,
Date(Date#(%DatumId, 'DD.MM.YYYY'), 'DD.MM.YYYY') as Format4,
Timestamp(StartTime + Date(Num#(%DatumId,'#####'), 'DD.MM.YYYY'), 'YYYY-MM-DD hh:mm:ss') as TimeStamp1,
Timestamp(TimeStamp#(StartTime & %DatumId, 'YYYY-MM-DD hh:mm:ss')) as TimeStamp2
Find the solution:
TimeStamp(Time#(StartTime, 'hh:mm:ss') + %DatumId, 'YYYY-MM-DD hh:mm:ss') as StartTimeTimeStamp
Problem was the Time and not the integer-Date (43881).
Time was in the format looks like this: '18:00:00'
Hope now I have a real Timestamp.
Find the solution:
TimeStamp(Time#(StartTime, 'hh:mm:ss') + %DatumId, 'YYYY-MM-DD hh:mm:ss') as StartTimeTimeStamp
Problem was the Time and not the integer-Date (43881).
Time was in the format looks like this: '18:00:00'
Hope now I have a real Timestamp.