Skip to main content
kanamiekka
Participant
January 3, 2020
Question

timeToCurrentFormat() --- How to remove frames

  • January 3, 2020
  • 3 replies
  • 4213 views

Hi,

 

I'm trying to make a counter which has hours:minutes:seconds. When I'm using timeToCurrentFormat() script frames are showing. Is there some way to make a counter like that?

 

Thanks:)

This topic has been closed for replies.

3 replies

Mathias Moehl
Community Expert
Community Expert
January 4, 2020

there is also the "interfaces instead of code solution" of iExpressions:

https://mamoworld.com/after-effects-expression/counter-time

It allows very flexible and easy formatting of the counter and generates the expressions for you, so there is no need to read or write any code.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Mylenium
Legend
January 3, 2020
kanamiekka
Participant
January 3, 2020

Thanks!

 

This worked well.

Inspiring
January 3, 2020

The timetoCurrentFormat() expression is going to do exactly what it says, convert time to your current format, which likely means that your comp's time display is in frames. 

 

If you hold Ctrl and click the blue frame counter in the top-left of your comp then it will switch to timecode and so will your text. Check out the attached screenshot for where you can change this. You can also change it in Project Settings > Time Display Style > Timecode

 

 

If you want something that's more reliable (especially if you'll be sharing this project and each user will have different settings) then you might want to consider using the Timecode effect under Effects & Presets > Text >Timecode.

kanamiekka
Participant
January 3, 2020

What I ment was I would like to counter shown HH:MM:SS (not like HH:MM:SS:FF).

Do you think this is possible?


Thanks

kanamiekka
Participant
January 3, 2020

Ah, I see. What about just masking off the last colon and two numbers? The length of the text shouldn't change since it starts at 00:00:00:00, so any increasing numbers won't make the text readout longer.


Actually the length changes if not using mono spaced fonts.

 

Thanks anyway:)