Date format conversion

Looking for a little help.
Need to take date data from (YEAR) field in (YYYY-MM-DDTHH:MM:SS) format and move it to (RELEASETIME) field in (DD-MM-YYYY) format.
Something like "2017-04-16T07:00:00Z" to "16-04-2017"
Any advice? :huh:

The YEAR field looks a lot like the proper format for field RELEASETIME. I would not change it at all.
RELEASETIME has both: the day and the hour. And it needs it in the sequence of year-month-day.

So, if you change the order then it might be that you get suprising results esp. when sorting as you then get all first days of all months first, then the second and so on.l

Do have a look into ... e. g. ...
... and follow the ISO 8601 date time standard format,...
especially for the tagfield RELEASETIME.


ok so this (DD-MM-YYYY) format is "broken" for (RELEASETIME) field.
but it always could be added in (COMMENT) or somewhere else, so is there a way to convert date somehow?

Create an action of the type "Format value" for COMMENT or somewhere else.
Format string: $regexp('2017-04-16T07:00:00Z',(\d+)-(\d+)-(\d+)T.*,$3-$2-$1)

Instead of the '2017-04-16T07:00:00Z' part of the expression set the source field name, e.g. %year%.

perfect, exactly what I needed, problem solved.
thanks a lot! :laughing:

Here's a different variation I'm trying to solve. How do I change format of type:

1/13/2001 -> 2001-01-13
3/2/1998 -> 1998-03-02

I feel like I'm close, but no cigar yet...


Could you show us what you have tried so far - it is much easier to build on that.

Well To be honest, no so far really - Just testing diff variations of the above but without dashes in the input field - something like :

$regexp(%date%',(\d+)\/(\d+)\/(\d+),$3-$2-$1) ,

I'm also using an online regex builder but in all honesty, trying to figure this out is very painful to my brain, I've always sucked at regex... :frowning: Sorry/Thanks!

Edit - I think the tricky part is going to be adding the leading zeroes where none exist, but I'm not even that far yet. :expressionless:

I think in

the order is the wrong one - it should be
to turn 1/13/2001 into 2001-01-13

In a second step you could add the zero like:

1 Like

There are several ways to get the leading zeroes to your date.
Assuming, your date 3/2/1998 comes from the tag DATE:

1 Like

Thanks man, that's much closer. I think I can get there from here, but if not I'll post back later.

Love this community - where else can you post on a 5 year old thread and get an answer in minutes?

You guys rock, thanks @ohrenkino & @LyricsLover

Thanks all - Here is how to get a date formatted like 1/4/2011 to 2011-01-04 from YEAR, reformat it, and copy it to RELEASETIME

Your link to the external picture hoster doesn't work (anymore).

You can copy & paste such print screens directly in your answer :wink:

I got it OK. Here is the image pasted:

If you don't need WORK (assuming your instruction %null% in the 5th entry delete the content), you can strip the 2nd and 5th entry completely.
Replace %work% in the 3rd command with %releasetime%

1 Like

Ah thanks - I hadn't really cleaned it up yet, good catch, thanks! :slight_smile:

1 Like