i have a particular case of a task that was assigned to me like a week ago and i'm stuck on it.
last week i was told that i have to make that i need to make a search that finds all rows inserted in a determined month of a particular year, let's say i need to return all rows inserted in november of 2019 not specifying the day, that is fine to that point, the tricky part is that usually the database i work on have the dates converted to number, resulting in dates stored something like this "43275" because of the numeric conversión so it makes difficult to search data because it won't match unless it is converted as well.
i tried a couple of methods such as format date time, converting by cdate(most accurate 'till now) but none has done the job, the cdate converts the data to date, but adds the first day making it useless as well, here is a portion of the code i'm trying
numero_mes = request.item("numero_mes")
numero_anio = request.item("numero_anio")
fecha_buscador_cip = cDate(numero_mes &"-"& numero_anio)
buscar_fecha = clng(fecha_buscador_cip)
the result of that code is a conversion similar to what i need but not exactly since the converted date varies since there is a specific date, how can i do the task i'm assigned? i can't find a way yet to do this, any kind of help would be great, thanks in advance.
Calculate November 1 and 30 as numbers, and then find all numbers between (and including) those two.
I don’t know your conversion, but let’s say Nov 1 converts to 42501 and Nov 30 is 42530. Do a query for all records WHERE date >= 42501 AND date <= 42530