hi anyone who can help me how do i declare date-time format in vb.net from sql server 2005? i dont know where to put this line

CONVERT(VARCHAR(10), GETDATE(), 1) AS [MM/DD/YYYY]

Recommended Answers

All 4 Replies

Exactly what you try to I cant understand you problem can you explain your problem

From 24H time Format to 12H?

use this

Dim d As Date = Format(Now, "MM-dd-yyyy")
Dim DD As String : Dim MM As String : Dim YYYY As String
        DD = Now.Day : MM = Now.Month : YYYY = Now.Year
        TextBox1.Text = MM & "/" & DD & "/" & YYYY
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.