I am lost with the new date. The code that is commented out

//Dim D As New Xojo.Core.Date(2015, 9, 1, 15, 20, 30, 0, Xojo.Core.TimeZone.Current)

works, but when I replace hard typed integers with actual integers, I get a syntax error with the following code.

Dim D As New Xojo.Core.Date(yy, mo, dd, hh, mi, , 0, 0, Xojo.Core.TimeZone.Current)

Any ideas?

[code]//161001_0300 The incoming format is yymmdd_hhmm

Using Xojo.Core

Dim yy as Int64

Dim mo as Int64

Dim dd as Int64

Dim hh as Int64

Dim mi as Int64

yy = CLong(left(t,2)) + 2000

if mid(t,3,1) = “0” then

mo = CLong(mid(t,4,1))

else

mo = CLong(mid(t,3,2))

end if

if mid(t,5,1) = “0” then

dd = CLong(mid(t,6,1))

else

dd = CLong(mid(t,5,2))

end if

if mid(t,8,1) = “0” then

hh = CLong(mid(t,9,1))

else

hh = CLong(mid(t,8,2))

end if

if mid(t,10,1) = “0” then

mi = CLong(mid(t,11,1))

else

mi = CLong(mid(t,10,2))

end if

Dim D As New Xojo.Core.Date(yy, mo, dd, hh, mi, , 0, 0, Xojo.Core.TimeZone.Current)

//Dim D As New Xojo.Core.Date(2015, 9, 1, 15, 20, 30, 0, Xojo.Core.TimeZone.Current)

Return D

[/code]