change date format

how to change the date timepicker date format

Page 1 of 1

3 Replies - 5465 Views - Last Post: 23 June 2009 - 01:26 PM Rate Topic: -----

#1 yangma  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 51
  • Joined: 03-May 09

change date format

Posted 22 June 2009 - 12:24 AM

i changed the date of datetimepicker format to yyyy-mm-dd in custom format...but it displays 2009-00-22...the month part is not showing the month of the exact month..how to change the format of the date??thanks
Is This A Good Question/Topic? 0
  • +

Replies To: change date format

#2 Luc001  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: change date format

Posted 22 June 2009 - 02:55 AM

Hi,

You can try this:

DateTimePicker1.CustomFormat = "YYYY-MM-DD"


Was This Post Helpful? 0
  • +
  • -

#3 yangma  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 51
  • Joined: 03-May 09

Re: change date format

Posted 22 June 2009 - 10:44 PM

i used the MM instead of mm..it works...i wonder how small letter don work here..nawys thanks
Was This Post Helpful? 0
  • +
  • -

#4 Steeeve  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 58
  • Joined: 03-December 08

Re: change date format

Posted 23 June 2009 - 01:26 PM

You have to use it from the list of accepted formats.

m = one- or two-digit minutes
mm = two-digit MINUTES
M = one- or two-digit month
MM = two-digit MONTH
MMM = three-letter month abbreviation
MMMM = full month name
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1