dingir
asked on
Swedish dateformat
I'm itching my head off getting this format: "21 februari 2006"
The codepage would be sweden, LCID = ??
Also the text of the month (if it don't work with swedish monthnames, then just show the first three chars) and how do I make the today-date prints like that above?
Maybe Swedish monthname works with some kind of with-function? If month = 01 then "januari" aso.
Swedish month from january to december:
januari
februari
mars
april
maj
juni
juli
augusti
september
oktober
november
december
Thank you!
The codepage would be sweden, LCID = ??
Also the text of the month (if it don't work with swedish monthnames, then just show the first three chars) and how do I make the today-date prints like that above?
Maybe Swedish monthname works with some kind of with-function? If month = 01 then "januari" aso.
Swedish month from january to december:
januari
februari
mars
april
maj
juni
juli
augusti
september
oktober
november
december
Thank you!
Or you could set up an array with the months like this
arrSWEMon = Array("","januari","februa ri","mars" ,"april"," maj","juni ","juli"," augusti"," september" ,"oktober" ,"november ","decembe r")
Then when you want the month just use
arrSWEMon(1)
to give you januari
or arrSWEMon(DATEPART("m",now ()))
to give you the current month (februari)
Scott
arrSWEMon = Array("","januari","februa
Then when you want the month just use
arrSWEMon(1)
to give you januari
or arrSWEMon(DATEPART("m",now
to give you the current month (februari)
Scott
ASKER
Hi Scott! Thank you! But the main problem is the code to format the today date as mentioned above: "21 februari 2006"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Colosseo! Thank you! That was EXACTLY what I need! I've spent hours on difference formatting and failed :-)
Result:
<%
Function getSWEDate()
strTempDate = ""
arrSWEMon = Array("","januari","februa ri","mars" ,"april"," maj","juni ","juli"," augusti"," september" ,"oktober" ,"november ","decembe r")
strTempDate = DATEPART("d",now()) & " " & arrSWEMon(DATEPART("m",now ())) & " " & DATEPART("yyyy",now())
getSWEDate = strTempDate
End Function
%>
<%=getSWEDate()%>
Result:
<%
Function getSWEDate()
strTempDate = ""
arrSWEMon = Array("","januari","februa
strTempDate = DATEPART("d",now()) & " " & arrSWEMon(DATEPART("m",now
getSWEDate = strTempDate
End Function
%>
<%=getSWEDate()%>
http://www.webwizguide.com/asp/faq/date_time_settings.asp
so 1053 for sweden
Scott