Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: ForumAE BasicsAE ExpressionsTutorialsArticlesPodcastsMotion GraphicsTrainingCinema 4D

text>numbers>date in CAPITALS?

Cow Forums : Adobe After Effects Expressions
text>numbers>date in CAPITALS?
by Scott (Scott G) on Jun 21, 2006 at 12:16:36 pm

is 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?

Respond to this post     Return to posts index

Re: text>numbers>date in CAPITALS?
by Mylenium on Jun 21, 2006 at 4:32:21 pm

Well, nobody is stopping you from using multiple instances of the effect to get your custom formats...

Mylenium

[Pour Myl

Respond to this post     Return to posts index

Re: text>numbers>date in CAPITALS?
by Lloyd Alvarez on Jun 21, 2006 at 5:40:47 pm

Create 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)



Respond to this post     Return to posts index


Re: text>numbers>date in CAPITALS?
by Scott on Jun 21, 2006 at 11:44:34 pm

thanks, 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

Respond to this post     Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSLIBRARYPODCASTSBLOGSMAGAZINESERVICESNEWSLETTERSNEWSSTOREEVENTS

© CreativeCOW.net All rights are reserved.

[Top]