[opencms-dev] Show an OpenCmsDateTime element
David García González
david.garciag at fundacionctic.org
Thu Jun 9 12:07:58 CEST 2005
Hi Carol,
You could try something like:
<%@ page import="java.util.*" %>
<%
Map params=request.getParameterMap();
if(params != null){
String[] a_Fecha=(String[])params.get("f");
long l_fecha=(a_Fecha!=null?Long.parseLong(a_Fecha[0]):0L);
if(l_fecha != 0){
Date fecha=new Date(l_fecha);
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("dd/MM/yy");
out.print(format.format(fecha));
}
}
%>
"1118377860000"
-----Mensaje original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] En nombre de Carol Mancho Lagunas
Enviado el: jueves, 09 de junio de 2005 9:45
Para: opencms-dev at opencms.org
Asunto: [opencms-dev] Show an OpenCmsDateTime element
Hi all,
It's possible to show an OpenCmsDateTime with tag <cms:contentshow..>?
I have created a xmlcontent Schema with an OpenCmsDateTime element, but
if I show this Date in a jsp with:
<cms:contentshow element="Date" />
it appears like this: "1118377860000"
How can I make it look like a real date?
Kind regards, Carol
--
______________________________________________
Carol Manchó Lagunas carol at asic.udl.es
Campus Virtual
Àrea de sistemes de Informació i Comunicacions
Universitat de Lleida
Pça. Víctor Siurana,1 25003 Lleida
Telèfon: +34 973 702140 / +34 973 702040
______________________________________________
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list