Dato fecha !!Confusión
Publicado por veronik (3 intervenciones) el 06/09/2007 20:42:51
Hola!!!!
Tengo una gran duda y agradezco de antemano su ayuda
Tengo un query que le tengo que poner como parametro la fecha de comienzo y la fecha fin
start_date y end_date
creation_date between :start_date and :end_date
mi pregunta es:
¿Cómo se que es mejor utilizar? o cu'al es la diferencia entre las siguientes sentencias?
to_date(creation_date) between :start_date and :end_date
to_date(creation_date, 'dd/mm/yyyy') between :start_date and :end_date
to_date(creation_date, 'dd/mm/yyyy') between to_date(:start_date, 'dd/mm/yyyy') and to_date(:end_date, 'dd/mm/yyyy')
to_char(creation_date) between :start_date and :end_date
Tengo una gran duda y agradezco de antemano su ayuda
Tengo un query que le tengo que poner como parametro la fecha de comienzo y la fecha fin
start_date y end_date
creation_date between :start_date and :end_date
mi pregunta es:
¿Cómo se que es mejor utilizar? o cu'al es la diferencia entre las siguientes sentencias?
to_date(creation_date) between :start_date and :end_date
to_date(creation_date, 'dd/mm/yyyy') between :start_date and :end_date
to_date(creation_date, 'dd/mm/yyyy') between to_date(:start_date, 'dd/mm/yyyy') and to_date(:end_date, 'dd/mm/yyyy')
to_char(creation_date) between :start_date and :end_date
Valora esta pregunta


0