MS Access DateDiff() လုပ်ဆောင်ချက်
ဥပမာ
နှစ်များအလိုက် ရက်စွဲနှစ်ခုကြား ခြားနားချက်ကို ပြန်ပေးပါ။
SELECT DateDiff("yyyy", #13/01/1998#, #09/05/2017#);
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
DateDiff() လုပ်ဆောင်ချက်သည် ရက်စွဲနှစ်ခုကြား ခြားနားချက်ကို ပြန်ပေးသည်။
အထားအသို
DateDiff(datepart, date1, date2, firstdayofweek,
firstweekofyear)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
datepart | Required. The part to return. Can be one of the following values:
|
date1 and date2 | Required. The two dates to calculate the difference between |
firstdayofweek | Optional. Specifies the first day of the week.
Can be one of the following values:
|
firstdayofyear | Optional. Specifies the first week of the year. Can be one of the following values:
|
နည်းပညာဆိုင်ရာအသေးစိတ်
အလုပ်လုပ်သည်- | Access 2000 မှ |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ရက်စွဲနှစ်ခုကြား၊ လများတွင် ခြားနားချက်ကို ပြန်ပေးပါ။
SELECT DateDiff("m", #13/01/1998#, #09/05/2017#);
ဥပမာ
သတ်မှတ်ထားသောရက်စွဲနှင့် ယနေ့ရက်စွဲအကြား ခြားနားချက်ကို ရက်များတွင် ပြန်ပေးပါ-
SELECT DateDiff("d", #13/01/1998#, Date());