Date Format problems.

Results 1 to 2 of 2

Thread: Date Format problems.

  1. #1
    Join Date
    Dec 1969

    Default Date Format problems.

    Guys<BR>Having a problem with a DatePicker function on one of my sites. <BR>Heres the code where i populate the textbox based on the date picked in a popup calendar<BR><BR>String.Format("JavaScript:window.o pener.document.{0}.value = &#039;{1:d}&#039;; window.close();", Request.QueryString("field"), e.Day.Date))<BR><BR>The format {1:d} returns the short date format, on my localhost the default settings are set to en-gb which means that this date is shown as dd/mm/yyyy which is the way i would like it to look.<BR><BR>Once i copied it up to the server i found out that the server is en-us and shows this as mm/dd/yyyy<BR><BR>Is there any way i can change the {1:d} to ensure it always appears as dd/mm/yyyy??

  2. #2
    Join Date
    Dec 1969

    Default RE: Date Format problems.

    You can try this {0:dd/MM/yyyy}. Maybe you need not need the en-gb if the above works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts