Help on date formating

J

John Carnahan

This gives me the (SHORT) date format I'm looking for on my development sys.
But on the ISP's system
I get the Date and time (LONG).

Dim sd As String = master_detailsDV(0)("START_ACT")

lbl_startact.Text = sd.Format("{0:d}", sd)

.......... displays 5/1/2002 on local and 5/1/2002 3:00:00 AM on the
ISP

---- on a bound column in a grid, the short date displays correctly on both
the local and ISP

'<asp:BoundColumn DataField="START_ACT" HeaderText="Act.Start"
DataFormatString="{0:d}"></asp:BoundColumn>

.......... displays 5/1/2002 on both local and ISP

What do I need to do to get the first example to display a short date...
i.e. 5/1/2002
 
A

Alvin Bruney

use a picture format, that way you can avoid all culture setting ambiguities
toString("yyyyMMdd") for example

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top