Activity › Forums › Adobe After Effects Expressions › Date countdown?
-
Patrick Grossien
February 22, 2017 at 4:04 pmDan, this is fabulous. Much better than the numbers effect because of the better font control!
Is there a way to control the start and end date via keyframes instead of the rate?
And also: is there a way to add a time counter to it so I can also end at any given date & time?Thanks so much!
-
Patrick Grossien
February 26, 2017 at 3:23 pm[Sorry for the double post – I’m just not sure if the reply was done in the correct place.]
Dan, this is fabulous. Much better than the numbers effect because of the better font control!
Is there a way to control the start and end date via keyframes instead of the rate?
And also: is there a way to add a time counter to it so I can also end at any given date & time?Thanks so much!
-
Ciji James
September 10, 2019 at 3:53 pmIs there a way to alter this expression to count up rather than count down… If not what could be an easy way to do a count up in the british format, say from 4/10/2020 to 20/4/2021???
startDate = "Apr 30 2012";
endDate = "Feb 25 1980";
rate = 2; // counts per secondd1 = new Date(startDate);
d2 = new Date(endDate);
msPerDay = 24*60*60*1000;
t = Math.floor((time-inPoint)*rate);
ms = Math.max(d1.getTime() - t*msPerDay,d2);
d = new Date(ms);
dy = "" + d.getDate();
mo = "" + (d.getMonth()+1);
yr = "" + d.getFullYear();
if (dy.length < 2) dy = "0" + dy;
if (mo.length < 2) mo = "0" + mo;
dy + "/" + mo + "/" + yr -
Dan Ebberts
September 10, 2019 at 4:59 pmI think this works:
startDate = "Feb 25 1980";
endDate = "Apr 30 2012";
rate = 2; // counts per secondd1 = new Date(startDate);
d2 = new Date(endDate);
msPerDay = 24*60*60*1000;
t = Math.floor((time-inPoint)*rate);
ms = Math.min(d1.getTime() + t*msPerDay,d2);
d = new Date(ms);
dy = "" + d.getDate();
mo = "" + (d.getMonth()+1);
yr = "" + d.getFullYear();
if (dy.length < 2) dy = "0" + dy;
if (mo.length < 2) mo = "0" + mo;
dy + "/" + mo + "/" + yr
Dan
-
Dan Darling
December 1, 2020 at 6:11 amIm having a hard time figuring out how to control the interpolation with a slider like you suggested :/ is it just replacing that ‘t=linear..’ line? Cant figure out how that works.
Reply to this Discussion! Login or Sign Up