I appreciate it!
I added this functionality in the last update (v2.0.2), so you can update the plugin!
Also using the shortcode, like:
[TotalDatetimeDifference startDate="31.12.2020" endDate="now" format="h"]
This will output the number 4728, which is how many hours have passed since 12.31.2020.
You can put different values in the format to calculate the DateTime difference in them:
y – for years
m – for months
w – for weeks
d – for days
h – for hours
i – for minutes
s – for seconds
If i do this:
[DatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]
It gives me 11
So I think it’s not working 😉
Ohhhhhh… TotalDateTimeDifference 🙂
Lemme try again 🙂
Nope, when i do: [TotalDatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]
I get:
[TotalDatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]
It’s not converting to a time…
Found it, without the time it does work 🙂
But, I want with the time 🙂
[TotalDatetimeDifference startDate=”09.07.2021″ endDate=”now” format=”h”]
= 181
But [TotalDatetimeDifference startDate=”09.07.2021 1:52″ endDate=”now” format=”h”]
Should give: 179
By the way, your personal website rocks!
It looks like we have the same time zone (CET), I just checked and it gives me 179.
Input: https://snipboard.io/iYgkzG.jpg
Output: https://snipboard.io/PdHGfM.jpg
Make sure that you have the correct time zone selected in the WordPress dashboard > Settings > General: https://snipboard.io/Y60ErS.jpg
I guess it had some formatting when I was testing because now it works ok.
Thank you very much!