Guys please help me out on ths'
I have created a table in sql ' managed to change datetime to date only in (sql query analyzer ' parsed it ) its shown date only n sql table but its shown both datetime in vb.net textbox Please tell me if my method is right or gve me the correct method.
I will be really thankful. U can even e mail me direct on my e mail
sunilgill2007@hotmail.com
sunil01
0
Newbie Poster
Recommended Answers
Jump to PostUse ToShortDateString of the DateTime class. Here's an example
Dim SQLDateTime As Date Dim OnlyDate As String ' Debug, get this value from SQL Server. Notice: This is my locale date format SQLDateTime = CDate("15.5.2009 15:53:00") OnlyDate = SQLDateTime.ToShortDateString MessageBox.Show(OnlyDate, "Only Date", MessageBoxButtons.OK, MessageBoxIcon.Information)
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.