Hello,
i want to get data from SQL-Server per ADO. The problem is the field date from the type datetime.
With the following code i get only then date-part of the field:
rs.Open('SELECT TrendNdx, Date, Value FROM ASample WHERE ...
MESSAGE(FORMAT(rs.Fields().Item(1).Value));
Does anybody know, how i can get the time-part?
Dirk
0
Comments
DATEPART
Returns an integer representing the specified datepart of the specified date.
Syntax
DATEPART ( datepart , date )
Arguments
datepart
Is the parameter that specifies the part of the date to return. The table lists dateparts and abbreviations recognized by Microsoft® SQL Server™.
Datepart Abbreviations
year yy, yyyy
quarter qq, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
weekday dw
hour hh
minute mi, n
second ss, s
millisecond ms
Arhontis
https://forum.mibuso.com/search