Creative Communities of the World Forums

The peer to peer support community for media production professionals.

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

    Scott G replied 19 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • Mylenium

    June 21, 2006 at 4:32 pm

    Well, 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 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)

  • Scott G

    June 21, 2006 at 11:44 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy