Nedir?

İki tarih değeri arasındaki farklı verilen birime göre hesaplar ve çevirir.

Sentaks
<SetVariable Name="$(Result)">
   <DateTimeDifference Part="Second">
      <Value Target="Date">::/Production/User[1]/@LastLogin</Value>
      <Value Target="Date">::/Production/User[2]/@LastLogin</Value>
   </DateTimeDifference>
</SetVariable>
Form Verisi
<Production>
    <User Name="Deniz" SurName="Kocaboğa" LastLogin="2008-04-28T18:00:00Z">205</User>
    <User Name="Ertan" SurName="Tike" LastLogin="2008-04-29T10:00:00Z">411</User>
 </Production>

Örnek sentaks a göre her iki Value değeri de tarih değerini tutar ve arasındaki farkı integer yani sayı tipinde $(Result) değerine yazar.

Özellikler


Adı
Açıklama

Part

Birim Bölümü bu bölümde bildirilir.

AdÖzellik
SecondSaniye değerini belirtir ve ilgili tarihe saniye eklemesi yapar
MinuteDakika değerini belirtir ve ilgili tarihe saniye eklemesi yapar
HourSaat değerini belirtir ve ilgili tarihe saniye eklemesi yapar
DayGün değerini belirtir ve ilgili tarihe saniye eklemesi yapar
MonthAy değerini belirtir ve ilgili tarihe saniye eklemesi yapar

Örnekler

$(Result) sayı tipinde bir değerdir ve bu değer  /Production/User[1]/@LastLogin yolunda bulunan tarih ile /Production/User[2]/@LastLogin yolunda bulunan tarihi çıkarır ve sonucu Minute(Dakika) olarak sonuç değerini tutar.

Dakika Ekleme Örneği
<SetVariable Name="$(Result)">
   <DateTimeDifference Part="Minute">
      <Value Target="Date">::/Production/User[1]/@LastLogin</Value>
      <Value Target="Date">::/Production/User[2]/@LastLogin</Value>
   </DateTimeDifference>
</SetVariable>


$(Result) sayı tipinde bir değerdir ve bu değer  /Production/User[1]/@LastLogin yolunda bulunan tarih ile /Production/User[2]/@LastLogin yolunda bulunan tarihi çıkarır ve sonucu Hour(Saat) olarak sonuç değerini tutar.

Saat ekleme örneği
<SetVariable Name="$(Result)">
   <DateTimeDifference Part="Hour">
      <Value Target="Date">::/Production/User[1]/@LastLogin</Value>
      <Value Target="Date">::/Production/User[2]/@LastLogin</Value>
   </DateTimeDifference>
</SetVariable>


$(Result) sayı tipinde bir değerdir ve bu değer  /Production/User[1]/@LastLogin yolunda bulunan tarih ile /Production/User[2]/@LastLogin yolunda bulunan tarihi çıkarır ve sonucu Day(Gün) olarak sonuç değerini tutar.

Gün ekleme örneği
<SetVariable Name="$(Result)">
   <DateTimeDifference Part="Day">
      <Value Target="Date">::/Production/User[1]/@LastLogin</Value>
      <Value Target="Date">::/Production/User[2]/@LastLogin</Value>
   </DateTimeDifference>
</SetVariable>


$(Result) sayı tipinde bir değerdir ve bu değer  /Production/User[1]/@LastLogin yolunda bulunan tarih ile /Production/User[2]/@LastLogin yolunda bulunan tarihi çıkarır ve sonucu Month(Ay) olarak sonuç değerini tutar.

Ay ekleme örneği
<SetVariable Name="$(Result)">
   <DateTimeDifference Part="Month">
      <Value Target="Date">::/Production/User[1]/@LastLogin</Value>
      <Value Target="Date">::/Production/User[2]/@LastLogin</Value>
   </DateTimeDifference>
</SetVariable>

Ayrıca Bakınız

Value

  • No labels