Re: [GENERAL] inevitability of to_date() when converting representations which don't represent whole timestamps

2017-03-30 Thread Adrian Klaver
On 03/30/2017 08:21 AM, Shaun Cutts wrote: On Mar 30, 2017, at 10:02 AM, Adrian Klaver > wrote: On 03/29/2017 06:19 PM, Shaun Cutts wrote: When being asked to convert a day of the week, the to_date() function returns the same day

Re: [GENERAL] inevitability of to_date() when converting representations which don't represent whole timestamps

2017-03-30 Thread David G. Johnston
On Thu, Mar 30, 2017 at 8:21 AM, Shaun Cutts wrote: > > My use case is to convert the name of a day to a day of the week number — > now testing in English, but ultimately locale insensitive, so relying on > to_date() to recognize the day in whatever the database locale

Re: [GENERAL] inevitability of to_date() when converting representations which don't represent whole timestamps

2017-03-30 Thread Peter J. Holzer
I don't understand what you mean by "inevitability" in the subject. On 2017-03-29 21:19:56 -0400, Shaun Cutts wrote: > When being asked to convert a day of the week, the to_date() function > returns the same day ('0001-01-01 BC’) no matter which day is > converted: > > # select to_date(‘Monday’,

Re: [GENERAL] inevitability of to_date() when converting representations which don't represent whole timestamps

2017-03-30 Thread Adrian Klaver
On 03/29/2017 06:19 PM, Shaun Cutts wrote: When being asked to convert a day of the week, the to_date() function returns the same day ('0001-01-01 BC’) no matter which day is converted: # select to_date(‘Monday’, ‘Day’) '0001-01-01 BC’ # select to_date(‘Tuesday’, ‘Day’) '0001-01-01 BC’

[GENERAL] inevitability of to_date() when converting representations which don't represent whole timestamps

2017-03-29 Thread Shaun Cutts
When being asked to convert a day of the week, the to_date() function returns the same day ('0001-01-01 BC’) no matter which day is converted: # select to_date(‘Monday’, ‘Day’) '0001-01-01 BC’ # select to_date(‘Tuesday’, ‘Day’) '0001-01-01 BC’ However, if it were to return a date that was that