Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello
how to convert linux date to only minutes DD/MM/YYYY hh:mm
i didn't get it it work with second but in minutes this did't work
thanks for your helps
the trick is that when i use TimeStamp(Makedate(1970,1,1)+ date_order /24/60/60 ,'DD/MM/YYYY hh:mm' ) it display in minutes but still join in second
i modified it to Timestamp#(TimeStamp(Makedate(1970,1,1)+ date_order /24/60/60 ,'DD/MM/YYYY hh:mm' ),'DD/MM/YYYY hh:mm')
and it ok
thank you Anil
thanks but what i want is to convert that to date like DD/MM/YYYY hh:mm
may be try this
subfield(DateField,' ',2) as Min
How is your format in UNIX looks like?
table_test:
LOAD
timestamp((date_order/(24*60*60)) + (2 + date#('1/1/1970') - date#('1/1/1900')),'DD/MM/YYYY hh:mm') as TimesTampLinuxM,
quantite,
prix,
State
FROM [lib://bd.test/Classeur1.xlsx]
(ooxml, embedded labels, table is Feuil1);
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
MinMaxDates:
LOAD Floor(Min(TimeStamp#([$(vFieldDateTimeM)], 'DD/MM/YYYY hh:mm'))) AS MinDate,
Floor(Max(TimeStamp#([$(vFieldDateTimeM)], 'DD/MM/YYYY hh:mm'))) AS MaxDate
RESIDENT $(vTableDate);
LET vMinDate = FieldValue('MinDate', 1);
LET vMaxDate = FieldValue('MaxDate', 1);
DROP TABLE MinMaxDates;
TempCalendar:
LOAD DayStart(TimeStamp(TimeStamp#($(vMinDate),'DD/MM/YYYY hh:mm') + (RecNo()/60/24) + (IterNo() -1))) AS AddedDate,
TimeStamp(TimeStamp#($(vMinDate), 'DD/MM/YYYY hh:mm') + (RecNo()/60/24) + (IterNo() -1)) AS AddedTimeStamp
AUTOGENERATE 1439 WHILE $(vMinDate) + IterNo() -1 <= $(vMaxDate);
MasterCalendar:
LOAD
AddedTimeStamp AS $(vFieldDateTimeM),
Date(Floor(AddedTimeStamp), 'DD/MM/YYYY') as Date_test,
AddedDate as date_test2,
Hour(AddedTimeStamp) AS MyHour,
Minute(AddedTimeStamp) AS MyMinute,
Second(AddedTimeStamp) AS MySecond,
Year(Date(Floor(AddedTimeStamp), 'DD/MM/YYYY')) As Année,
Month(Date(Floor(AddedTimeStamp), 'DD/MM/YYYY')) As Mois,
week(AddedTimeStamp) As Semaine,
Day(AddedTimeStamp) As Jour,
YeartoDate(AddedTimeStamp)*-1 as CurYTDFlag,
YeartoDate(AddedTimeStamp,-1)*-1 as LastYTDFlag,
InYear(AddedTimeStamp, Monthstart($(vMaxDate)),-1) as RC12,
Date(monthstart(AddedTimeStamp), 'MMM-YYYY') as MonthYear,
ApplyMap('QuartersMap', month(AddedTimeStamp), Null()) as Trimestre,
Week(weekstart(AddedTimeStamp)) & '-' & WeekYear(AddedTimeStamp) as WeekYear,
WeekDay(AddedTimeStamp) as JourSem ,
Date(Floor(AddedTimeStamp) -7, 'DD/MM/YYYY') as [j-7] ,
Date(Floor(AddedTimeStamp) -14, 'DD/MM/YYYY') as [J-14]
RESIDENT TempCalendar
ORDER BY AddedTimeStamp ASC;
DROP TABLE TempCalendar;
but this didn't work
when it is in seconds it work
this just for display i know it
Can you check this? Then, We will write Master calendar
table_test:
LOAD
TimeStamp(Makedate(1970,1,1)+ date_order /24/60/60) as TimesTampLinuxM,
quantite,
prix,
State
FROM [lib://bd.test/Classeur1.xlsx]
(ooxml, embedded labels, table is Feuil1);
for this it work
the problem is that when i work whith the master calendar it didn't work like it didn't get the same date
it didn't establish links