Date format on BSP page

Question: Is it a method to convert a SAP date into a format who supports Clients systems dependent.

For a french explorer : DD/MM/YYYY
For a english explorer : MM/DD/YYYY
etc ...
all in a method per example ...
The only solution I have looks like
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<%
data: date_test type D value '20020201'.
data: jour(2).
data: mois(2).
data: annee(4).
annee = date_test(4).
mois = date_test+4(2).
jour = date_test+6(2).
%>
<head>
</head>
<body>
<%= jour %>/<%= mois %>/<%= annee %>.
<script language="JavaScript">
var sapdate = new Date();
var strdate;

sapdate.setDate(<%=jour%>);
sapdate.setMonth(<%=mois%>);
sapdate.setYear(<%=annee%>);
strdate = sapdate.toLocaleString();
document.write(strdate);


</script>



</body>
_________________
Jerome

Answer:
Hi,

we use:

<% page->write( DATUM ). %>

this write`s the date in the format, which is choosen in user settings. But you have to be careful - when you write a date to a html form field in a special format, and you want the user to submit the value of this form field later, you have to convert it back into sap database format. The best way to do so is Javascript.

Bye TJ

Answer:
Nice ... My problem is that I used only 1 client for all connection beetween WAS and R/3 systems (RFC). But Thanks
You really help me
Best regards
Jerome
Copyright ?2007 - 2008 www.jt77.com