Dynamic tag: {format_date}

I suggest to also have the option to have something like: {format_data:human_time_diff}??

Not sure if applicable and what would be the used case here (transferring one date into another format). Anyway, I have not tried it yet but the dynamic filter already exists

{post_date:human_time_diff} – outputs the date difference in a human readable format such as “1 hour”, “5 mins”, “2 days”

I got something like this:

{format_date @date:‘{query_api @key:‘date’}’ @from:‘Y-m-d\TH:i:sO’ @to:‘M d, Y’} - it would still be nice if we could show the human_time_diff

you mean the bricks dynamic filter :human_time_diff doesn’t work in your case?

do you mean something like this:

{format_date @date:‘{query_api @key:‘date’}’ @from:‘Y-m-d\TH:i:sO’ @to:‘M d, Y’:human_time_diff} - that’s not working and screws up: this is what I get: ‘Dec 12, 2025’:0300000012pm12_315812America/Phoenix_1258ff

no instead {format_date @date:‘{query_api @key:‘date’}’ @from:‘Y-m-d\TH:i:sO’ @to:‘human_time_diff’} but is it what you want to get?

I see - I understand now how it could be done to get something like Dec 11, 2025 - 1 day ago but that’s a lot of code to do this - at least it can be done

My issue is not with the time difference. The tag itself is not working for me.

@kwsim

This {format_date} is only available in 2.2-beta

Maybe you are using 2.1.4?

1 Like

OH! Well, that explains that. Thanks.