「VB.NET」TimeSpan 構造体で日時を計算する
書式
TimeSpan(Int32, Int32, Int32, Int32)
TimeSpan 構造体の新しいインスタンスを指定された日数、時間数、分数、秒数に初期化します。
使用例
Module Module1
    Sub Main()
        'DateTime型変数
        Dim dtA As New DateTime(2021, 4, 9, 12, 20, 20)
        '時間間隔 6日 10時間 30分 10秒 
        Dim tss As New TimeSpan(6, 10, 30, 10)
        '引き算をして日時を求める
        Dim resB As DateTime = dtA - tss
        Console.WriteLine(resB)
        ' 足し算をして求める
        Dim resA As DateTime = dtA + tss
        Console.WriteLine(resA)
        Console.ReadKey()
    End Sub
End Module
結果
2021/04/03 1:50:10
2021/04/15 22:50:30