Ed
asked on
Asp.net(vb) Format textbox as date no time.
How do I format a value from the DB as just dd/mm/yyyy
txtDateCompleted.Text = objDR3("DATECOMPLETED")
shows as - 22/05/2014 00:00:00
I'd like to get rid of the 00:00:00
I have tried
txtDateCompleted.Text = objDR3("DATECOMPLETED").To String("dd /MM/yyyy")
but this does not work.
txtDateCompleted.Text = objDR3("DATECOMPLETED")
shows as - 22/05/2014 00:00:00
I'd like to get rid of the 00:00:00
I have tried
txtDateCompleted.Text = objDR3("DATECOMPLETED").To
but this does not work.
ASKER
Thanks, that works....... however in some cases the record maybe blank and this throws an error. How can I cater for null values?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oh yes, why didn't I think of that.... perfect thanks.
Any of the following will do the job for you.
Open in new window
OR
Open in new window