Forum Discussion
parzival1220
2 years agoFrequent Visitor
DATETIME Column
Hi there, I have a datetime field in the format "20/11/2023 20:33:45". I would like to create a new column that ages this datetime value against the current system datetime value (e.g. today's da...
v-zhangti
2 years agoCommunity Support
Hi, parzival1220
You can try the following methods.
Column:
Now = NOW()Second = DATEDIFF([Datetime],[Now],SECOND)New Time =
var vSeconds=[Second]
var vMinutes=int( vSeconds/60)
var vRemainingSeconds=MOD(vSeconds, 60)
var vHours=INT(vMinutes/60)
var vRemainingMinutes=MOD(vMinutes,60)
var vDays=INT(vHours/24)
var vRemainingHours=MOD(vHours,24)
return
vDays&" Days & "&
vRemainingHours&" Hours & "&
vRemainingMinutes&" Minutes & "&
ROUND(vRemainingSeconds,0)& " Seconds"
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.