如何获取Azure DocumentDB中的当前时间 [英] How can I get the current time in Azure DocumentDB
本文介绍了如何获取Azure DocumentDB中的当前时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找与MySQL now()类似的东西.任何格式都可以.
I'm looking for the equivalent of MySQL now(). Any format is fine.
推荐答案
此用户定义函数(UDF)应该可以解决问题.
This User Defined Function (UDF) should do the trick.
function now() {
return new Date();
}
您会这样称呼它:
SELECT udf.now(), c.date, c.id FROM c WHERE c.date < udf.now()
这篇关于如何获取Azure DocumentDB中的当前时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文