- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Nov 24, 2024 03:26 AM - edited ‎Nov 24, 2024 03:29 AM
Hi I have two fields ie a created time field and a formula field for the time field. I have an issue with time displayed in the formula field. It seems to convert the time I don't know why,, here is the formula: IF( {Posting Date} > NOW(), "Posted: Timestamp is in the future", "Posted " & IF( DATETIME_DIFF(NOW(), {Posting Date}, 'seconds') < 60, DATETIME_DIFF(NOW(), {Posting Date}, 'seconds') & " seconds ago", IF( DATETIME_DIFF(NOW(), {Posting Date}, 'minutes') < 60, DATETIME_DIFF(NOW(), {Posting Date}, 'minutes') & IF(DATETIME_DIFF(NOW(), {Posting Date}, 'minutes') = 1, " minute ago", " minutes ago"), IF( DATETIME_DIFF(NOW(), {Posting Date}, 'hours') < 24, DATETIME_DIFF(NOW(), {Posting Date}, 'hours') & IF(DATETIME_DIFF(NOW(), {Posting Date}, 'hours') = 1, " hour ago", " hours ago"), IF( DATETIME_DIFF(NOW(), {Posting Date}, 'days') = 1, "Yesterday at " & DATETIME_FORMAT({Posting Date}, 'h:mm A'), IF( DATETIME_DIFF(NOW(), {Posting Date}, 'days') < 7, DATETIME_FORMAT({Posting Date}, 'dddd'), IF( YEAR(NOW()) = YEAR({Posting Date}), DATETIME_FORMAT({Posting Date}, 'dddd, MMM D'), DATETIME_FORMAT({Posting Date}, 'dddd, MMM D YYYY') ) ) ) ) ) ) )
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Nov 24, 2024 05:51 AM
Assuming you're talking about the ones for "Yesterday":
 
That's probably due to a timezone setting and I'd recomend trying to set the "Posting Date" timezone to be GMT
As an example, here it is in +8:
And here's your formula with GMT:
