如果DateTime为空,可以使用以下方法来获取今天的日期:
var dateTime = new Date();
import datetime
dateTime = datetime.date.today()
import java.util.Date;
Date dateTime = new Date();
SELECT CURDATE() AS dateTime;
SELECT GETDATE() AS dateTime;
exports.main_handler = async (event, context) => {
const dateTime = context.currentDateTime;
return dateTime;
};
总结:
腾讯云相关产品和产品介绍链接地址:
领取专属 10元无门槛券
手把手带您无忧上云