这个函数将从作为参数的构成中创建一个日期和时间值。
date_create_datetime(year, month, day, hour, minute, second);
参数 | 类型 | 描述 |
---|---|---|
year | Real | 设定年份。 |
month | Real | 设定月份。 |
day | Real | 设定天数。 |
hour | Real | 设置小时。 |
minute | Real | 设置分钟。 |
second | Real | 设置秒数。 |
mydatetime = date_create_datetime(2011, 9, 15, 9, 43, 30);
这将把“mydatetime”设置为给定的日期和时间,并将返回值存储在变量“mydatetime”中。