Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my database the column field posteddate format is '2010-05-03 11:59:37.640'.
In this I want to retreive the data using only date. How is it possible to get the data from the database.
Please tell me.
Posted
Updated 28-Oct-10 18:52pm
v4

select convert(varchar,getdate(),104)

u can use format from 100 to 104 as per you choice
& u can put ur date in place of getdate()
or write like

select convert(varchar,posteddate,104)
 
Share this answer
 
v2
to retreive data from db must be used part of SQL called DML.. this site explains sql in simple way
 
Share this answer
 
select convert(varchar,getdate(),104)

Use this u will get date alon.....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900