i have problem. how can set cultureinfo date, when date comes database.
i have database, recorded date/time, when request have arrived. displays this: 2/24/2013 5:41:12 pm
, want display 5. toukokuuta 2013
. more info format want here it's in line 68 (finnish)
the code have:
<script language="vb"> imports system imports system.globalization imports system.threading public class formatdate public shared sub main() dim dt datetime = datetime.now ' sets currentculture property u.s. english. thread.currentthread.currentculture = new cultureinfo("fi-fi") ' displays dt, formatted using shortdatepattern ' , currentthread.currentculture. console.writeline(dt.tostring("d. mmmm'ta 'yyyy")) end sub end class </script>
that code dosen't work now. here string, want combine it:
<%# databinder.eval(container.dataitem, "pvmaika") %>
(that pvmaika database value, means datetime)
in front of page, have <%@ page culture="fi-fi" language="vb" debug="true" %>
. include culture="fi-fi"
.
that work!
Comments
Post a Comment