Difference Between 2 Dates or 2 Times

本文介绍如何使用PeopleCode中的DateDiff与DateTimeDiff函数来计算两个日期之间的天数或两个时间戳之间的分钟数差异。DateDiff函数返回两个日期间的天数差,而DateTimeDiff函数则返回两个时间戳之间的分钟数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

There are many occassions where you might want to find the difference in time or days between two dates. Use the PeopleCode function known as DateDiff.

 

The %DateDiff meta-SQL function returns an integer representing the difference between two dates in number of days.

Syntax:
%DateDiff(date_from, date_to)

If you would like to know the difference in minutes, you can use %DateTimeDiff

The %DateTimeDiff meta-SQL function returns a time value, representing the difference between two datetimes in minutes

Syntax:
%DateTimeDiff(datetime_from, datetime_to)

转载于:https://www.cnblogs.com/GoDevil/archive/2009/01/09/1372657.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值