Exemplo n.º 1
0
    public static DateTime ConvertToDatetime(string timestamp)
    {
        long     lTime = long.Parse(timestamp + "0000000");
        TimeSpan toNow = new TimeSpan(lTime);

        return(DtStart.Add(toNow));
    }
Exemplo n.º 2
0
 private void ExtrapolateTimes()
 {
     if (DtEnd == null && DtStart != null && Duration != default(TimeSpan))
     {
         DtEnd = DtStart.Add(Duration);
     }
     else if (Duration == default(TimeSpan) && DtStart != null && DtEnd != null)
     {
         Duration = DtEnd.Subtract(DtStart);
     }
     else if (DtStart == null && Duration != default(TimeSpan) && DtEnd != null)
     {
         DtStart = DtEnd.Subtract(Duration);
     }
 }