取得日期时间类型的日期,时间,年,月,日
select
top
10
convert
(
char
(
10
),shijian,
126
),
convert
(
varchar
(
8
),
getdate
(),
108
),
convert
(
varchar
(
10
),
getdate
(),
120
),
DatePart
("d",shijian),
DatePart
("m",shijian),
DatePart
("yyyy",shijian),
year
(shijian),
month
(shijian),
DAY
(shijian)
from
t_news_t
asp取得小时,分钟
dim shijian_f
shijian_f=rs_f("shijian")
'shijian_f="2007-12-28 21:13:57.263"
shijian_f=mid(shijian_f,12,5)