Tema: Campo fecha
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/04/2002, 16:31
Avatar de ashketchum
ashketchum
 
Fecha de Ingreso: julio-2001
Ubicación: En algun lugar de un gran pais
Mensajes: 418
Antigüedad: 23 años, 10 meses
Puntos: 0
Re: Campo fecha

Hola, prueba con esto y me avisas:

Código:
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>					
function Fecha(str, nNamedFormat, nLCID)				
	dim strRet								
	dim nOldLCID								
										
	strRet = str								
	If (nLCID > -1) Then							
		oldLCID = Session.LCID						
	End If									
										
	On Error Resume Next							
										
	If (nLCID > -1) Then							
		Session.LCID = nLCID						
	End If									
										
	If ((nLCID < 0) Or (Session.LCID = nLCID)) Then				
		strRet = FormatDateTime(str, nNamedFormat)			
	End If									
										
	If (nLCID > -1) Then							
		Session.LCID = oldLCID						
	End If									
										
	DoDateTime = strRet							
End Function									
</SCRIPT>

y el campo lo formateas asi:

<%= Fecha((Recordset1.Fields.Item("FechaAlta").Value), 2, 2057) %>
saludos y suerte


<img src="http://www.efrance.fr/masterASP/firma.jpg" width="465" height="79" border="0" usemap="#URL">
<map name="URL">
<area shape="rect" coords="270,48,347,61" href="http://www.efrance.fr/masterasp" target="_blank">
</map>