Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 convert date

Author  Topic 

satya068
Posting Yak Master

233 Posts

Posted - 2011-02-10 : 07:07:49
Hello Guys,

can you tell me how to convert date format from 25/01/1999 to DD/MM/YYYY HH24:MI:SS

i have used the
to_date(to_char(to_date(Q_FIX_DATE.EMP_STATUS_LAST_DATE,'YYYYMMDD.HH24MISS'),'DD/MM/YYYY HH24:MI:SS'),'DD/MM/YYYY HH24:MI:SS')

i am getting null values in my target table after using the above function.

could you guys have any idea about changes in my function.

Thanx

Satya

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-02-10 : 07:26:00
to_date and to_char are not t-sql functions...what kind of language is this? What are the datatypes for the input/output?

- Lumbago
My blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/
Go to Top of Page
   

- Advertisement -