#author("2019-11-24T15:13:20+09:00","","")
#author("2019-11-24T15:13:43+09:00","","")
#navi(../)

* DateとDateTimeの違い(Visual Basic) [#zf989a22]
Visual Basicでは、日付に関するデータ型に''Date''と''DateTime''があります。~
結果を先に書くと、&Color(red){''Date''と''DateTime''は同じ};ようです。
結果を先に書くと、&Color(red){''Date''と''DateTime''は同じ};ようです。~
以下に、DateとDateTimeが同じであることが書いてあったURLなどをご紹介します。

#contents


* 参考サイト [#cf1feb36]
-[[Microsoft|.NET データ型の概要(Visual Basic)>https://docs.microsoft.com/ja-jp/dotnet/visual-basic/language-reference/data-types/index]]

//#htmlinsert(windev-top.html)

* DateとDateTimeについて [#s42bf202]
以下に「[[Microsoft|.NET データ型の概要(Visual Basic)>https://docs.microsoft.com/ja-jp/dotnet/visual-basic/language-reference/data-types/index]]」から抜粋(引用)したDate, DateTimeのデータ型を記します。


|BGCOLOR(NAVY):COLOR(WHITE):''Visual Basic の種類''|BGCOLOR(NAVY):COLOR(WHITE):''共通言語ランタイム型の構造体''|BGCOLOR(NAVY):COLOR(WHITE):''公称ストレージ割り当て''|BGCOLOR(NAVY):COLOR(WHITE):''値の範囲''|
|''Date''|''DateTime''|8バイト|0:00:00 (午前0時)、0001年1月1日から&br;11:59:59 PM (9999 年12月31日)|


上表の通り、DateとDateTimeは同じようですね。~
DateTimeは共通言語ランタイム(CLR)の型なので、DateTimeを使った方が~
C#など他の言語との共通性もあるので良さそうですね。

以上、Visual Basicの ''Date'' と ''DateTime'' は%%の違い%%同じでした。


#htmlinsert(windev-btm.html)

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS