SAS
Monday, 10 October 2011
SQL- Scalar Functions- FORMAT()
n
The FORMAT() function is used to format how a field is to be
displayed.
Syntax:
SELECT FORMAT(
column_name,format
) FROM table_name
Query:
SELECT EMPname, salary, FORMAT(NOW()
,
'YYYY-MM-DD‘)
AS PERDATE
FROM EMPtbl1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment