public static DateAndTime FromDateTime(DateTime dt)
{
return new DateAndTime(
new Date(
(byte)(dt.Year - 1900),
(byte)(dt.Month),
(byte)(dt.Day),
(byte)(dt.DayOfWeek)),
new Time(
(byte)(dt.Hour),
(byte)(dt.Minute),
(byte)(dt.Second),
(byte)(dt.Millisecond / 10)));
}