sql server 2005 - Putting getdate()'s data into a string -
in sqlserver 2005, using query:
select getdate()
or print getdate()
i want use returned date string access to:
- the month
- the year(last 2 digits)
- date (eg: 01)
- time (eg: 5:12)
i want concatenate data. should in string format.
first of all: all formatting should done on client.
got out of way convert , datepart functions.
convert offers lots of styles can use, while datepart returns part of date integer can convert varchar.
just note there lot of functions these on web searching wouldn't bad idea.
Comments
Post a Comment