PHP date_time_set() လုပ်ဆောင်ချက်
ဥပမာ
အချိန်သတ်မှတ်ပါ-
<?php
$date=date_create("2013-05-01");
date_time_set($date,13,24);
echo date_format($date,"Y-m-d H:i:s");
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
date_time_set() လုပ်ဆောင်ချက်သည် အချိန်ကို သတ်မှတ်ပေးသည်။
အထားအသို
date_time_set(object, hour, minute, second, microseconds)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
hour | Required. Specifies the hour of the time |
minute | Required. Specifies the minute of the time |
second | Optional. Specifies the second of the time. Default is 0 |
microseconds | Optional. Specifies the microsecond of the time. Default is 0 |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အောင်မြင်မှုတွင် DateTime အရာဝတ္ထုကို ပြန်ပေးသည်။ ရှုံးနိမ့်မှုအပေါ် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | 5.2+ |
PHP Changelog- | PHP 7.1- ထည့်သွင်းထားသော microseconds ပါ ရာမီတာ PHP 5.3- ပြန်လာတန်ဖိုးကို NULL မှ DateTime သို့ ပြောင်းခဲ့သည် |
❮ PHP နေ့စွဲ/အချိန် အကိုးအကား