1

I have two fields that I am trying to combine into a DateTime field. The first field is a DATE field and the second field is a character field that has the time in 24hour format.

For example:

field1: 10/02/13 field2: 19:58:18

How can I get this into a DATETIME field?

4

1 回答 1

3

DATETIME() 函数将为您完成:

mdate = DATE()
mtime = TIME()

? DATETIME(YEAR(mdate), MONTH(mdate), DAY(mdate), VAL(LEFT(mtime, 2)), VAL(SUBS(mtime, 3, 2)), VAL(RIGHT(mtime, 2)))
于 2013-10-22T15:40:25.440 回答