private static string GetDateTimeOffset(string filterToken) { if (!DateTime.TryParse(removeDateTimePrefix(filterToken), out DateTime result)) { throw new InvalidFilterException("DateTime filter token value invalid", filterToken); } return(SchemaUtil.GetUtcTicksString(result)); }
public void WriteDateTime(DateTime?value) { ThrowIfDisposed(); ThrowIfInvalidState("WriteDateTime", TableEntityWriterState.Value); WriteNameAux(elemantName); if (!value.HasValue) { WriteNull(DataType.DateTime); } else { WriteValue(DataType.DateTime, SchemaUtil.GetQuotedString(SchemaUtil.GetUtcTicksString(value.Value))); } UpdateWriterState(); }