Date and Currency

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Master

    Date and Currency

    i have a little problem that i can't fix, in the Regional option of
    the Win2k server control panel i have set the Euro currency and
    the date format with dd/mm/yyyy but all the peoples that use a simple asp
    script like asp ASP date(),
    get the $ currency and the Usa date as mm/dd/yyyy, do you know where can
    i change this on the server?

    thank you

    --


  • CJM

    #2
    Re: Date and Currency

    IIS will probably be using US date format by default.

    It's probably best that you forget trying to tweak your server, and instead,
    get your application to handle dates in a portable and consistent way:


    Chris

    "Master" <dlc2000@@liber o.it> wrote in message
    news:2M7Fc.4043 96$hc5.17410067 @news3.tin.it.. .[color=blue]
    > i have a little problem that i can't fix, in the Regional option of
    > the Win2k server control panel i have set the Euro currency and
    > the date format with dd/mm/yyyy but all the peoples that use a simple asp
    > script like asp ASP date(),
    > get the $ currency and the Usa date as mm/dd/yyyy, do you know where can
    > i change this on the server?
    >
    > thank you
    >
    > --
    >
    >[/color]


    Comment

    • Bullschmidt

      #3
      Re: Date and Currency

      Dates & Times - Usage & Formatting by Darryl Fosbery - 7/15/2000


      And to make a variable be in the format of mm/dd/yyyy (and the final
      line of code can be modifed for other date formats), perhaps try
      something like the following which you might even make into a function:

      varFld = CDate(MyVariabl e)

      intMonth = Month(varFld)
      intDay = Day(varFld)
      intYr = Year(varFld)

      If intMonth < 10 Then
      strMonth = "0" & CStr(intMonth)
      Else
      strMonth = CStr(intMonth)
      End If

      If intDay < 10 Then
      strDay = "0" & CStr(intDay)
      Else
      strDay = CStr(intDay)
      End If

      strYr = Right(CStr(intY r), 4) ' And change the 4 to 2 for 2 year dates.

      varFld = CStr(strMonth & "/" & strDay & "/" & strYr)

      Best regards,
      J. Paul Schmidt, Freelance ASP Web Designer
      Do you have an idea for a database on the Web? Hi! I'm a freelance Web and/or database developer who can make database information available 'live' on the Web.

      ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


      *** Sent via Devdex http://www.devdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Evertjan.

        #4
        Re: Date and Currency

        Bullschmidt wrote on 05 jul 2004 in
        microsoft.publi c.inetserver.as p.general:[color=blue]
        > varFld = CDate(MyVariabl e)
        >
        > intMonth = Month(varFld)
        > intDay = Day(varFld)
        > intYr = Year(varFld)
        >
        > If intMonth < 10 Then
        > strMonth = "0" & CStr(intMonth)
        > Else
        > strMonth = CStr(intMonth)
        > End If[/color]

        strMonth = Right("0"+intMo nth,2)
        [color=blue]
        > If intDay < 10 Then
        > strDay = "0" & CStr(intDay)
        > Else
        > strDay = CStr(intDay)
        > End If[/color]

        strDay = Right("0"+intDa y,2)
        [color=blue]
        > strYr = Right(CStr(intY r), 4) ' And change the 4 to 2 for 2 year dates.
        >
        > varFld = CStr(strMonth & "/" & strDay & "/" & strYr)[/color]

        Why all these CStr()-s, Paul?

        ASP/vbs does this by default.

        ===============

        There are many ways to Rome, or to the White House:

        function Eur2Usa(d)
        dArr = split(d,"/")
        temp = dArr(0)
        dArr(0) = dArr(1)
        dArr(1) = temp
        Eur2Usa = join(dArr,"/")
        end function

        response.write Eur2Usa("dd/mm/yyyy")

        --
        Evertjan.
        The Netherlands.
        (Please change the x'es to dots in my emailaddress)

        Comment

        Working...