Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can any body help me to count time to deadline ?
I have a table
Task Deadline
1 20 Aug 15:00
2 25 Aug 16:00
3 12 Sep 11:00
I would like to count how many 'SS:MM:DD' is form now to this stepping forward deadline
Thank you in advance
Hi,
one solution could be:
table1:
LOAD *,
Day(Deadline) as DDay,
Month(Deadline) as DMonth,
Year(Deadline) as DYear;
LOAD Task,
Timestamp(SetDateYear(Timestamp#(Deadline,'DD MMM hh:mm'),Year(Today())),'DD MMM hh:mm') as Deadline
INLINE [
Task, Deadline
1, 20 Aug 15:00
2, 25 Aug 16:00
3, 12 Sep 11:00
];
replacing the year with the current year.
hope this helps
regards
Marco
Please find attachement
Thanks for support
but I would like to have text object which will countdown how many days,hh:mm:ss I have to earliest task not a table
Also I think I have a problem with a date format because if I write:
Day(Date#(Deadline,'DD/MM/YYYY')) as DDay,
Month(Date#(Deadline,'DD/MM/YYYY')) as DMonth,
Year(Date#(Deadline,'DD/MM/YYYY')) as DYear;
in Table viewer is like below
Time format in script I have defaults settings
SET TimeFormat='hh:mm:ss';
SET DateFormat='YYYY-MM-DD';
SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff]';
Thank you in advance
Can somebody help ?
Hi,
Try this
Day(Date#(Deadline,'D MMM hh:mm')) as DDay,
Month(Date#(Deadline,'D MMM hh:mm')) as DMonth,
Year(Date#(Deadline,'D MMM hh:mm')) as DYear;
The problem is - you don't have a year in your Deadline date, so you need to add it manually, something like this
= MakeDate(
2015,
month(date#('8 Aug 11:15', 'D MMM hh:mm')),
day(date#('8 Aug 11:15', 'D MMM hh:mm'))
)
Hi,
You need to get your dates in correct format, as I described here Re: Time to deadline
And then calculate difference between today and earliest task TimeDif = min(Deadline) - today(), then do this in texbox
= Floor(TimeDif )&', '&Time(Frac(TimeDif ),'hh:mm:ss')
for getting how many days,hh:mm:ss you have to earliest task in a table
Hi,
one solution could be:
table1:
LOAD *,
Day(Deadline) as DDay,
Month(Deadline) as DMonth,
Year(Deadline) as DYear;
LOAD Task,
Timestamp(SetDateYear(Timestamp#(Deadline,'DD MMM hh:mm'),Year(Today())),'DD MMM hh:mm') as Deadline
INLINE [
Task, Deadline
1, 20 Aug 15:00
2, 25 Aug 16:00
3, 12 Sep 11:00
];
replacing the year with the current year.
hope this helps
regards
Marco