Using time/date placeholders

In various PlayoutONE apps, jobs can be set up to dynamically name files using date placeholders which are automatically replaced with their corresponding value when the job is run.

For example, if you want to download a syndicated show or pull in a news bulletin despatched to a specific destination, the files may be called the same thing as an existing item in your library, so including the time or date would allow you to differentiate between them.

Date placeholders need to be set out within curly brackets. For example, we can set a file name as 'American Top 40 {MM-dd-yyyy}.mp3' and if the job ran on January 1st 2024, the file created would be called 'American Top 40 01-01-2024.mp3'.

Time and dates can follow any of the formats set out in Microsoft's .NET date strings. We have summarised some of the most commonly used ones below.

📅 Date placeholders

d Day of the month as a number between 1-31.
%suffix% The suffix used in ordinal numbers (1st, 2nd, 3rd etc.)
dd Day of the month as a two-digit number (a leading zero is used for single-digit values).
ddd Abbreviated day of the week. For example, Mon, Tue...
dddd Day of the week in full. For example, Monday, Tuesday...
M Month as a number between 1-12.
MM Month as a two-digit number, with a leading zero for January-September: 01-09.
MMM Abbreviated month. For example, Jan, Feb...
MMMM Month in full. For example, January, February...
y The year as a number between 0-99.
yy The year as a two-digit number between 00-99.
yyyy The year in full.

⏰ Time placeholders

h Hours in a 12-hour clock format, from 1 to 12.
hh Hours in a 12-hour format with a leading zero, from 01 to 12.
H Hours in a 24-hour clock format, from 1 to 24.
HH Hours in a 24-hour clock format, from 01 to 24.
m Minutes, from 0 to 59.
mm Minutes as two-digit numbers, from 00 to 59.
s Seconds, from 0 to 59.
ss Seconds as two-digit numbers, from 00 to 59.
t Abbreviated AM/PM indicator (eg. A or P).
tt AM/PM indicator (eg. AM or PM).

🧮 Other variables

&l Formats the file name in lowercase.
&U Formats the file name in uppercase.
<>

Dynamically calculate a date from the time the job runs.

For example, {yyyy-MM-dd<1,day>} will add one day to the file name from the current date, while {yyyy-MM-dd<-1,hour>} will deduct one hour.

%%Week_No%% Calendar week of the year as a number.
%%Week_No_2%% Calendar week two-digit number (padded with zeros where required).
%%Broadcast_Week_No%% Broadcast week number.
%%Broadcast_Week_No_2%% Broadcast week two-digit number (padded with zeros where required).

⏱️ Date Add

FileCopy allows you to add time to date placeholders used in file names. You may want to do this if your FileCopy job always happens days or hours ahead of time, and you want the file name to reflect the transmission date.

This could be used if you are fetching a syndicated radio show - like our American Top 40 example - which you know is always available to download on a Wednesday each week, even though it isn't broadcast until the Saturday.

If you wanted to run the FileCopy job on Wednesday but name the file for Saturday's date, you could add three days using the 'Date Add' field:

By adding three days, the job which is scheduled for Wednesday will use the date three days ahead, on Saturday.

You can also 'add' negative numbers to retrospectively name files. For example, if you are copying audio logs from the previous day.

Still need help? Contact Us Contact Us