はじめに Excel VBA マクロの日付 (Date) を入力や取得する方法を紹介します。 #月/日/年 時:分:秒# のようにして、日付を入力できます。 年/月/日 時:分:秒 形式の文字列を日付型 (Date) に代入して、日付に変換できます。 「Date 関数」、「Now 関数」、「Time 関数」から、今日の日付、日時、時刻を取得できます。 「Year 関数、Month 関数、Day 関数」から、年月日を取得できます。 「Hour 関数、Minute 関数、Second 関数」から、時分秒を取得できます。
![VBA 日付を入力する](https://cdn-ak-scissors.b.st-hatena.com/image/square/fcb70263fe7af1c8fc982e080c8c698eab1c990c/height=288;version=1;width=512/https%3A%2F%2Fcv.tipsfound.com%2Fhome%2Flogo-128.png)