Activity › Forums › Adobe After Effects Expressions › text>numbers>date in CAPITALS?
-
text>numbers>date in CAPITALS?
Posted by Scott G on June 21, 2006 at 12:16 pmis there a simple way to get after effects to display the current date in a format of my choice, rather than the dd/mm/yyyy format in the numbers effect? what if i want mm – dd, or m/d – yyyy?
Scott G replied 19 years, 10 months ago 3 Members · 3 Replies -
3 Replies
-
Mylenium
June 21, 2006 at 4:32 pmWell, nobody is stopping you from using multiple instances of the effect to get your custom formats…
Mylenium
[Pour Myl
-
Lloyd Alvarez
June 21, 2006 at 5:40 pmCreate a text layer and apply this expression to the Source Text property:
part = Date(0).split(” “);
month=part[1];
day=part[2];
year=part[3];
if (month==”Jan”) {month=”01″}
if (month==”Feb”) {month=”02″}
if (month==”Mar”) {month=”03″}
if (month==”Apr”) {month=”04″}
if (month==”May”) {month=”05″}
if (month==”Jun”) {month=”06″}
if (month==”Jul”) {month=”07″}
if (month==”Aug”) {month=”08″}
if (month==”Sep”) {month=”09″}
if (month==”Oct”) {month=”10″}
if (month==”Nov”) {month=”11″}
if (month==”Dec”) {month=”12″}// the following line is where you can change the formatting:
month + “/” + day + “/” + “0”+(year-2000)
-
Scott G
June 21, 2006 at 11:44 pmthanks, that’s exactly what i was after. i came across the date() code last night, but then wasn’t sure if i could use IF statements in expressions. i know i could use them in scripts but i didn’t think expressions could contain such things.
now that i know, well, it opens up a world of possibilities!
and much more elegant that simply using multiple instances of the effect and masking. :p
Reply to this Discussion! Login or Sign Up