Thursday, June 29, 2023

Show date with respect to current time

 With({x:ThisItem.Created},With({y:Now()},If(DateDiff(x,y,TimeUnit.Seconds)<60,DateDiff(x,y,TimeUnit.Seconds)&" sec ago",If(DateDiff(x,y,TimeUnit.Minutes)<60,DateDiff(x,y,TimeUnit.Minutes)&" min ago",If(DateDiff(x,y,TimeUnit.Hours)<24,DateDiff(x,y,TimeUnit.Hours)&" hr ago",If(DateDiff(x,y,TimeUnit.Days)<30,DateDiff(x,y,TimeUnit.Days)&" day(s) before",If(DateDiff(x,y,TimeUnit.Months)<12,DateDiff(x,y,TimeUnit.Months)&" month(s) ago",x)))))))

No comments:

Post a Comment

Add Service Principle support in Custom Connector

  then search for "Streamlining Integration: Using Service Principal authentication on Custom connectors with Microsoft Graph Applicati...