With(
{
x: First(
Filter(
Posts,
PostID = ThisItem.PostID
)
).Created
},
With(
{
y: Now()
},
If(
DateDiff(
x,
y,
TimeUnit.Seconds
) < 60,
DateDiff(
x,
y,
TimeUnit.Seconds
) & " secs",
If(
DateDiff(
x,
y,
TimeUnit.Minutes
) < 60,
DateDiff(
x,
y,
TimeUnit.Minutes
) & " min(s)",
If(
DateDiff(
x,
y,
TimeUnit.Hours
) < 24,
DateDiff(
x,
y,
TimeUnit.Hours
) & " hour(s)",
If(
DateDiff(
x,
y,
TimeUnit.Days
) < 365,
DateDiff(
x,
y,
TimeUnit.Days
) & " days(s)",
x
)
)
)
)
)
)
No comments:
Post a Comment