Difference between revisions of "Date.SQLDateTime"

From Xojo Documentation

(SMBot: new page by automated transformation)
 
m (Text replacement - "{{Deprecated" to "{{DeprecatedItem")
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{DeprecatedItem|version=2019r2|replacement=[[DateTime.SQLDateTime]]}}
 
{{PropertyBox
 
{{PropertyBox
 
| name=SQLDateTime
 
| name=SQLDateTime
Line 5: Line 6:
 
| scope=public
 
| scope=public
 
| type=[[String]]
 
| type=[[String]]
 +
| readonly=yes
 
| platform=all
 
| platform=all
| newinversion=5.5
 
 
}}
 
}}
Gets and sets the date in SQL date/time format, YYYY-MM-DD HH:MM:SS.  Passing a bad string will result in an [[UnsupportedFormatException]].
+
{{Description
 +
|text = Gets and sets the date in SQL date/time format, YYYY-MM-DD HH:MM:SS.  Passing a bad string will result in an [[UnsupportedFormatException]]. }}
  
For example: 2008-09-03 13:39:16
+
==Notes==
 +
This is an example of an SQL date/time: 2008-09-03 13:39:16
 +
 
 +
== Sample Code ==
 +
The following code displays the current SQL date/time.
 +
<rbcode>
 +
Var d As Date = Date.Now
 +
Label1.Value = d.SQLDateTime
 +
</rbcode>

Latest revision as of 19:05, 3 September 2020

Read-Only Property (As String )
StringValue = aDate.SQLDateTime

Supported for all project types and targets.

Gets and sets the date in SQL date/time format, YYYY-MM-DD HH:MM:SS. Passing a bad string will result in an UnsupportedFormatException.

Notes

This is an example of an SQL date/time: 2008-09-03 13:39:16

Sample Code

The following code displays the current SQL date/time.

Var d As Date = Date.Now
Label1.Value = d.SQLDateTime