Reputation: 129
I am trying to pull dates using the BETWEEN function, but was wondering if the format made a difference. The format that the dates are in now is 'mm/dd/yyyy'. I have seen a lot of examples that have the format in 'yyyy/mm/dd'. Can I pull the data using the format I have now, or do I need to convert the format? Thanks everyone.
Upvotes: 0
Views: 9212
Reputation: 1646
I think what you want is:
Select EmailAddress,Birthday From table1 Where Birthday Between to_date('01-01-1946','MM-DD-YYYY') AND to_date('01-01-1988','MM-DD-YYYY');
Upvotes: 1
Reputation: 16673
the between clause should not have any formatting on the dates at all.
as in
BETWEEN start_dt AND end_dt
Upvotes: 0