Help on date formating

  • Thread starter Thread starter John Carnahan
  • Start date Start date
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
 
use a picture format, that way you can avoid all culture setting ambiguities
toString("yyyyMMdd") for example

regards
 
Back
Top