Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/09/2004, 13:34
vito_gris
 
Fecha de Ingreso: agosto-2002
Mensajes: 301
Antigüedad: 22 años, 8 meses
Puntos: 2
formato de fecha

Hola amigos tengo un problema con esta funcion que es el siguiente:
Al ingresar a la funcion una fecha de tipo "2/9/2004" me devuelve "09/02/2004" lo que no es correcto ya me intercambia el dia y el mes

Ahora si ingreso una fecha de tipo "11/9/2004" no tengo ningun problema ya que me devuelve "11/09/2004"

por su ayuda gracias

Public Function convertitfecha(dtDate)
If Not IsNull (dtDate) Then
dia=Day(dtDate)
cdias=len(dia)
if cdias < 2 then
dia="0"&dia
end if
mes= Month(dtDate)
cmes=len(mes)
if cmes < 2 then
mes="0"&mes
end if
convertitfecha = dia& "/" & mes & "/" & Year(dtDate)
Else
convertitfecha = dtDate
End If
End Function