I have problem with read a datetime format like this : 7/1/2014 6:02:09 AM , my goal is I want to compare some date in query oracle by to_date function but it seems different with the format, like there are no zero in the month, day, and hours.
my thought for the better query is like this to_date('7/1/2014 6:02:09 AM','MM/DD/YYYY HH:MI:SS AM')
but seems like I have wrong format for this.
Thanks in advance
to_date('7/1/2014 6:02:09 AM','MM/DD/YYYY HH:MI:SS AM')returns a validDATEvalue, so where is your problem?DATEinto a string and convert this with another string? Do the opposite, convert the string into aDATEand compare then the date values - this will work.