MS Access DatePart() လုပ်ဆောင်ချက်
ဥပမာ
သတ်မှတ်ထားသောရက်စွဲ၏ တစ်နှစ်အပိုင်းကို ပြန်ပေးပါ-
SELECT DatePart("yyyy", #09/05/2017#);
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
DatePart() လုပ်ဆောင်ချက်သည် ရက်စွဲတစ်ခု၏ သတ်မှတ်ထားသော အစိတ်အပိုင်းတစ်ခုကို ကိန်းပြည့်အဖြစ် ပြန်ပေးသည်။
အထားအသို
DatePart(datepart, date, firstdayofweek,
firstweekofyear)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
datepart | Required. The date part to return. Can be one of the following values:
|
date | Required. The date value to be evaluated |
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 DatePart("m", #09/05/2017#);
ဥပမာ
ယနေ့ရက်စွဲ၏ တစ်ပတ်တာရက်ကို ပြန်ပေးပါ-
SELECT DatePart("w", Date());