# Calculate how minutes have passed since a tweet was published

Hi Makers!

I need to compare two dates. This is something simple, right?
Well, I’m struggling to do so with Twitter.
I’ve got a filter where I’m getting the “created at” variable from a tweet (Make shows it as a “Date”) and I’m comparing it to the “now” variable from Make to try to get the difference in minutes between the datetime of the tweet and the current time.

I’ve also tried to simulate it in another scenario:

In this case, I try to parse the tweet date even if it is already seen as date by Make. But I’m getting this error:

If anyone has any help to provide, I’m all ear!

Thanks everyone!

I think you’re trying to math too much.

1. Convert the date thats coming in into a timestamp. {{TweetDate}}
2. Do {{now}} minus {{tweetDatetimestamp}}. {{SubtractedValue}}
3. Do format({{subtractedvalue}}; HH}} (I assume from your formula above that you just want to get the hour right? Other wise put in whatever it is you need instead of trying to obtain it mathematically.
2 Likes

Thank you @zbk28382 for your answer

I understand it but I’m still blocked by the second part that I described. The date provided from the tweet can’t be parsed or formatted (it’s in French).

To get a timestamp of {{TweetDate}} as you suggested, I would have to do {{formatDate({{parseDate({{TweetDate}} ; RIGHT_FORMAT)}}, X)}} right?

If yes, this RIGHT_FORMAT is not working for my case. I’m using d MMMM yyyy HH:mm for this received value from a tweet: “4 février 2023 15:00”.

I’ve tried to use the timezone argument too but I may have understood later that this had no influence on the value of the date.

1 Like

@zbk28382
It seems that this will work:

Thank you for your help

Sweet! Glad it worked out in the end. Bon Chance!

1 Like

Ah ah! Merci beaucoup

1 Like