Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have date in number format in one column and I have time in number format in one column. Now i made the date as date format by using the MakeDate function and time field as time by using MakeTime function. Same as I have two more fields called NewDate and NewTime. I have to findout the duration between these two dates. for that I need to make the first date and time columns as single field called datetime.... so that i can findout the time gap between these two date×...... Any help would be appreciated. Thanks in Advance.
first date first time second date second time
1/1/2012 9:40:00am 1/2/2012 9:10:00am
Awesome! Great ..... This helps a lot..... It is working ...... I really appreciate your help.........
If you already used Makedate() and Maketime() function to create your field values, creating a Timestamp or DateTime should just be as easy as adding the values for Date and Time. So, to get the gap between second and first Timestamp, you could use
LOAD
...
interval( ([second date]+[second time]) - ([first date]+[first time]) ) as Gap,
...
from Table;
Table is the table that holds the above fields (could also be a resident table or another load that creates the fields).
interval will format the Gap as TimeStamp, using the standard Timestamp format (or state the format as second parameter to the interval function.
Hope this helps,
Stefan
Awesome! Great ..... This helps a lot..... It is working ...... I really appreciate your help.........