Displaying GMT date as Local

If I have a date stored as GMT, I’m not seeing how to display it as Local (say, GMT-7). In this example, GMTTextField shows the date in question in SQLDateTime format:

Dim d As New Date d.SQLDateTime = GMTTextField.Text d.GMTOffset = -7 MsgBox Str(d)

But the MsgBox displays the date unchanged. Obviously I’m not using d.SQLDateTime correctly.

When you create the new Date, it is already set to your local timezone. Try this instead:

dim hereAndNow as new Date

dim d as new Date
d.GMTOffset = 0

d.SQLDateTime = GMTTextField.Text
d.GMTOffset = hereAndNow.GMTOffset

Thanks, Kem. That works nicely.