473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

--
Jul 19 '05 #1
3 1399
CJM
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:
http://www.aspfaq.com/show.asp?id=2260

Chris

"Master" <dlc2000@@libero.it> wrote in message
news:2M***********************@news3.tin.it...
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

--

Jul 19 '05 #2
Dates & Times - Usage & Formatting by Darryl Fosbery - 7/15/2000
http://www.asp-help.com/articles/dates.asp

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(MyVariable)

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(intYr), 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
http://www.Bullschmidt.com
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!
Jul 19 '05 #3
Bullschmidt wrote on 05 jul 2004 in
microsoft.public.inetserver.asp.general:
varFld = CDate(MyVariable)

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

If intMonth < 10 Then
strMonth = "0" & CStr(intMonth)
Else
strMonth = CStr(intMonth)
End If
strMonth = Right("0"+intMonth,2)
If intDay < 10 Then
strDay = "0" & CStr(intDay)
Else
strDay = CStr(intDay)
End If
strDay = Right("0"+intDay,2)
strYr = Right(CStr(intYr), 4) ' And change the 4 to 2 for 2 year dates.

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


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)
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DCM Fan | last post by:
{CREATE TABLEs and INSERTs follow...} Gents, I have a main table that is in ONE-MANY with many other tables. For example, if the main table is named A, there are these realtionships: A-->B...
2
by: Willing 2 Learn | last post by:
I'm still having trouble getting my program to do arithmetic in cents(keeping all #'s) then convert the answer in a format of dollars & cents. The main program should add, subtract, scalar...
1
by: HGT | last post by:
Hello all, I am currently on a project which the source data come into the databases is always dirty (not surprisingly); however, due to the design of the database, it is very difficult to...
7
by: meenasamy | last post by:
Hi all, i need to create a function that takes three parameters( Original currency, needed currency, amount) i need to convert from the original currency to the needed currency the amount and...
3
by: luis.c.torres | last post by:
Hello. I have and unbound form with a subform. The form has 4 controls (a combo, two txt boxes and a button). The combo has the filter criteria (Equal to, newer than, older than and between)...
1
by: JonathanParker | last post by:
Another quick one! Trying to search for records by both accounting period and by year in two seperate queries actioned by option buttons. I've sorted the formatting so it's in a UK format but I...
6
by: ljungers | last post by:
After doing some testing with setting a patern and using the ( if (preg_match($pattern, $field) I now have a good idea of editing/validating date, phone, zip and currency test boxes from user input...
16
by: xjohnx | last post by:
Hi, I'm hoping someone can help me I am quite new to Javascript and have had to create a programme which converts dollars into euros and vice versa, here is my script which is working var...
1
by: Akinyemi | last post by:
I am devloping developing a payroll program. I want the program to compute Year to Date (YTD) values for Salary, Allowances, Dedections, Tax, Net Pay. I have tried very many times to write the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.