how to get only date from datetime field of te table
-
hi,I have to display only date from the datetime field of table in DB, What function i should use in sql query? or Any other way? Please guide.
yog hui gfgh kgdgrt njjn hjgkn
-
hi,I have to display only date from the datetime field of table in DB, What function i should use in sql query? or Any other way? Please guide.
yog hui gfgh kgdgrt njjn hjgkn
If it's a question of display, your presentation layer should deal with it, not the DB.
Christian Graus - C++ MVP
-
hi,I have to display only date from the datetime field of table in DB, What function i should use in sql query? or Any other way? Please guide.
yog hui gfgh kgdgrt njjn hjgkn
Use the following in stored procedure, convert(varchar,checkindate,101) as checkindate This will extract only 15/11/2006 only. For ur reference: checkindate --> Field in the table. Hope u will understand it.
Janani
-
Use the following in stored procedure, convert(varchar,checkindate,101) as checkindate This will extract only 15/11/2006 only. For ur reference: checkindate --> Field in the table. Hope u will understand it.
Janani
if you want to extract only date you can use datepart function as SELECT DATEPART(month, GETDATE()) AS 'Month Number' but if you want to see full date u can use format = "d" or mm/dd/yyyy