Formatting date

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

How can I format today's date in the format "dd MMMM yyyyy"? My long data is
set to something else in regional settings so I need to hard code this some
how.

Thanks

Regards
 
Dim strDate As String = Format(Now, "dd MMMM yyyy")

----- John wrote: -----

Hi

How can I format today's date in the format "dd MMMM yyyyy"? My long data is
set to something else in regional settings so I need to hard code this some
how.

Thanks

Regards
 
John,
Have you tried the overloaded ToString method on Date?

Dim d As DateTime = DateTime.Now
Dim s As String = d.ToString("dd MMMM yyyyy")

Hope this helps
Jay
 
Back
Top