# DateTime(ロブロックス データ型) > A data type that represents a moment in time. - URL:https://roblox.minecraft-okinawa.com/reference/datatypes/DateTime/ - 公式:https://create.roblox.com/docs/reference/engine/datatypes/DateTime ## コンストラクター - `DateTime.now()`:Returns a DateTime representing the current moment in time. - `DateTime.fromUnixTimestamp(unixTimestamp: number)`:Returns a DateTime representing the given Unix timestamp. - `DateTime.fromUnixTimestampMillis(unixTimestampMillis: number)`:Returns a DateTime representing the given Unix timestamp in milliseconds. - `DateTime.fromUniversalTime(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number)`:Returns a new DateTime using the given units from a UTC time. - `DateTime.fromLocalTime(year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number)`:Returns a new DateTime using the given units from a local time. - `DateTime.fromIsoDate(isoDate: string)`:Returns a DateTime from an ISO 8601 date-time string (in UTC). ## プロパティ - `DateTime.UnixTimestamp: number`:The number of **seconds** between January 1st, 1970 at 00:00 UTC (the Unix epoch). - `DateTime.UnixTimestampMillis: number`:The number of **milliseconds** between January 1st, 1970 at 00:00 UTC (the Unix epoch). ## メソッド - `DateTime:ToUniversalTime(): Dictionary`:Returns the components of the DateTime in UTC. - `DateTime:ToLocalTime(): Dictionary`:Returns the components of the DateTime in local time. - `DateTime:ToIsoDate(): string`:Returns the DateTime as an ISO 8601 date-time string. - `DateTime:FormatUniversalTime(format: string, locale: string): string`:Returns the DateTime's value in UTC formatted into a string. - `DateTime:FormatLocalTime(format: string, locale: string): string`:Returns the DateTime object's value in local time formatted into a string. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)