Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi Guys,
I have one scenario in which i getting data every second a day
i.e. 25-Sep-15 12:00:01 AM
25-Sep-15 12:00:02 AM
25-Sep-15 12:00:03 AM
25-Sep-15 12:00:04 AM
25-Sep-15 12:00:05 AM
25-Sep-15 12:00:06 AM
so on...
25-Sep-15 01:00:01 AM
25-Sep-15 01:00:02 AM
25-Sep-15 01:00:03 AM
25-Sep-15 01:00:04 AM
I want i to extract intervals between then like below
25-Sep-15 02:00:01 AM
25-Sep-15 01:00:01 AM
25-Sep-15 03:00:01 AM
25-Sep-15 04:00:01 AM
25-Sep-15 05:00:01 AM
so on
Any Suggestion??
Please Revert...
Hi Abhay,
As you may be aware that you can load your table first, and you can then add the script suggested by Marco with Resident table option.
HTH,
Sreeni
I tried in that way...
TxnTable:
Load
Field1,
DateRecorded,
Temperature
From Source...
Concatenate(TxnTable)
Tran_Temp2:
LOAD *,
Timestamp(Floor(DateRecorded,'01:00:00','00:00:01'),'DD-MM-YY hh:mm:ss TT') as DateRecorded_Test,
Timestamp(Floor(DateRecorded,'01:00:00','00:00:01'),'DD-MM-YY hh:mm:ss TT') as TimeInterval;
LOAD
Timestamp(Today()-2+IterNo()/86400,'DD-MM-YY hh:mm:ss TT') as DateRecorded,
Ceil(Rand()*1000) as "fact"
AutoGenerate 1
While (Today()-2)+IterNo()/86400<=Now();
With respect to DateRecorded_Test, I am not Getting Temprature..
Please Suggest
Abhay
Its not clear what you are trying to do. Do you want to filter the TxnTable to get one reading per minute? If you supply some input data and the expected output, it might help.
Hey Jonathan,
Pls find the sample data...
i m getting Date with time stamp for every second..
I need the output like Interval Time Below
12:00:00 AM
01:00:00 AM
02:00:00 AM
and temperature w.r.t Interval Time..
Pls Suggest
Abhay
Pls Revert..
Hi,
Try
Timestamp(Date#(Date,'DD.MM.YYYY hh:mm:ss'),'DD/MM/YYYY hh:00:00 TT')
Regards
Your times in your sample do not cover every second, but to load your sample:
LOAD Id,
Date(Floor(Date#(Date, 'dd.MM.yyyy hh:mm:ss'))) As Date, //convert to pure date
Time(Frac(Date#(Date, 'dd.MM.yyyy hh:mm:ss')), 'hh:mm:ss TT') As Time, //convert to time in format requested
Num(Num#(Temperature, '0,0', ',')) As Temperature //read this as a number
FROM
(biff, embedded labels, table is Sheet1$);
Still not clear what you want to do this.