Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Date Time Formatting

  Asked By: Arland    Date: Apr 06    Category: Asp.net    Views: 956
  

I want to format Lbl_DOS.Text to MMM dd, yy. This is what it looks like:

Lbl_DOS.text = row1("ApptDate").ToString()

Right now it doesn't have a format and when the page loads it looks like this 4/19/1999 12:00:00 AM.

I have tryed formatting it like this: Lbl_DOS.Text = row1("ApptDate").ToString("MMM dd, yy") and I get this error:

Public Overridable Overloads Function ToString() As String' has no parameters and its return type cannot be indexed.

Any ideas?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Richie Smith     Answered On: Apr 06

Try:

Format(row1("ApptDate"),"d")

 
Didn't find what you were looking for? Find more on Date Time Formatting Or get search suggestion and latest updates.




Tagged: