Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/09/2005, 16:56
Avatar de JuanRAPerez
JuanRAPerez
Colaborador
 
Fecha de Ingreso: octubre-2003
Mensajes: 2.393
Antigüedad: 21 años, 6 meses
Puntos: 27
YO tuve un lio igual y lo resolvi de esta manera en SQL Server
espero te sirva


Cita:
'fecha = date()

fecha = date()
Dia = Day(fecha)
mes = Month(fecha)
anno = Year(fecha)
FechayyyymmddHOY = anno&Right(Cstr(mes + 100),2) & Right(Cstr (dia + 100),2)
'esto te devuelve FechayyyymmddHOY = 20060914

fechaBD = general.Fields("fecha")
DiaDB = Day(fechaBD)
mesBD = Month(fechaBD)
annoBD = Year(fechaBD)
FechayyyymmddBD = annoBD&Right(Cstr(mesBD + 100),2) & Right(Cstr (diaBD + 100),2)
'esto te devuelve FechayyyymmddBD = 20060913 (la fecha de ayer por ejemplo)

'luego comparas estas dos fechas como lot enes y te juro funciona a mi me funciono tri bien

If FechayyyymmddHOY = FechayyyymmddBD
__________________
JuanRa Pérez
San Salvador, El Salvador