[opencms-dev] Show an OpenCmsDateTime element

Carol Mancho Lagunas carol at asic.udl.es
Fri Jun 10 09:40:24 CEST 2005


Muchas gracias David!
Lo pruebo a ver si me sale!


Thanks for your help.



El jue, 09-06-2005 a las 12:07 +0200, David García González escribió:
> 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
______________________________________________







More information about the opencms-dev mailing list