C#C
C#3y ago
mrmiyagi

❔ DateTime?

CreationTimestamp = reader.GetDateTime(04),
TransmissionTimestamp = reader.IsDBNull(09) ? (DateTime?)null : reader.GetDateTime(09),
.
.
.
.
sb.Append($"(to_timestamp('{this.CreationTimestamp.ToLocalTime():yyyy-MM-dd HH:mm:ss}', 'YYYY-MM-DD HH24:MI:SS'), to_timestamp('{this.TransmissionTimestamp.ToLocalTime():yyyy-MM-dd HH:mm:ss}', 'YYYY-MM-DD HH24:MI:SS');");



I am trying to convert both of these dates to local time. It works CreationTimestamp but not for TransmissionTimestamp. The error given is something along the line of: "DateTime? doesnt have any reference to ToLocalTime".
Was this page helpful?