Link to home
Start Free TrialLog in
Avatar of Ed
EdFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Show date and no time in textbox

Whats the best way to display the date in a textbox without the time from the db?

Eg

       txtDateCompleted.Text = objDR3("DATECOMPLETED").ToString

Open in new window


Displays

01/07/2015 00:00:00

and I'd just like

01/07/2015


Thanks
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try

txtDateCompleted.Text = objDR3("DATECOMPLETED").ToString("dd/MM/yyyy", CultureInfo.InvariantCulture)

Regards
ASKER CERTIFIED SOLUTION
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try this

txtDateCompleted.Text = objDR3("DATECOMPLETED").ToString("MM/dd/yyyy")