Rango de fechas
Publicado por Juan (4 intervenciones) el 09/10/2002 22:40:36
tengo drama con la un rango de fechas
he intentado lo siguiente
1.- Sql = "{Dctos.FechaIngreso} between '" & Format(DtpDesde, "dd MMM yyyy") & "' and '" & Format(DtpHasta, "dd MMM yyyy") & "'"
2.- Sql = "{Dctos.FechaIngreso} in Date(" & Day(DtpDesde) & ",'" & MesPalabra(Month(DtpDesde)) & "'," & Year(DtpDesde) & ") to Date(" & Day(DtpHasta) & ",'" & MesPalabra(Month(DtpHasta)) & "'," & Year(DtpHasta) & ")"
3.- Sql = "{Dctos.FechaIngreso} >= Date(" & Format(DtpDesde, "dd,MMM,yyyy") & ") and {Dctos.FechaIngreso} <= Date(" & Format(DtpHasta, "dd,MMM,yyyy") & ")"
Pero ninguna funciona alguien tiene idea q puede ser
he intentado lo siguiente
1.- Sql = "{Dctos.FechaIngreso} between '" & Format(DtpDesde, "dd MMM yyyy") & "' and '" & Format(DtpHasta, "dd MMM yyyy") & "'"
2.- Sql = "{Dctos.FechaIngreso} in Date(" & Day(DtpDesde) & ",'" & MesPalabra(Month(DtpDesde)) & "'," & Year(DtpDesde) & ") to Date(" & Day(DtpHasta) & ",'" & MesPalabra(Month(DtpHasta)) & "'," & Year(DtpHasta) & ")"
3.- Sql = "{Dctos.FechaIngreso} >= Date(" & Format(DtpDesde, "dd,MMM,yyyy") & ") and {Dctos.FechaIngreso} <= Date(" & Format(DtpHasta, "dd,MMM,yyyy") & ")"
Pero ninguna funciona alguien tiene idea q puede ser
Valora esta pregunta
0