Skip to content

Instantly share code, notes, and snippets.

@maco1028
Last active May 7, 2017 13:29
Show Gist options
  • Save maco1028/13735240be67bd496402da603ef3aad3 to your computer and use it in GitHub Desktop.
Save maco1028/13735240be67bd496402da603ef3aad3 to your computer and use it in GitHub Desktop.
日付取得
// 現在時刻の取得
System.DateTime now = System.DateTime.Now;
int nowMonth;
int nowDay;
now = System.DateTime.Now;
nowMonth = now.Month;
nowDay = now.Day;
取得できる値
値 説明
Year 西暦
Month 月
Day 日
Hour 時
Minute 分
Second 秒
DayOfWeek 曜日
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment