Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-06 Thread Jens Alfke
> On Feb 1, 2018, at 10:57 AM, Chris Green wrote: > > But systems have language variables which tell which set to use. Your code that runs the query can use those system APIs to localize the day names. Just have the query return the raw date strings (or timestamps or

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Chris Green
R Smith wrote: > The reason day-names are not part of the standard set of date-time > functions is that they are not standard and certainly not international. > > For you it is "Mon, Tue, Wed, Thu, Fri, Sat Sun"... > > But for me it might be: > > "Lun, Mar, Mer, Jeu,

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread R Smith
The reason day-names are not part of the standard set of date-time functions is that they are not standard and certainly not international. For you it is "Mon, Tue, Wed, Thu, Fri, Sat Sun"... But for me it might be: "Lun, Mar, Mer, Jeu, Ven, Sam, Dim" or sometimes simply "Lu, Ma, Me, Je, Ve,

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Chris Green
x wrote: > Don’t think you’ll get it any less ugly than > > substr('SunMonTueWedThuFriSat',strftime('%w',Date)*3+1,3); > Yes, thanks, that's where I had got to! :-) -- Chris Green · ___ sqlite-users mailing list

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread x
Don’t think you’ll get it any less ugly than substr('SunMonTueWedThuFriSat',strftime('%w',Date)*3+1,3); without defining your own functions. From: Chris Green Sent: 01 February 2018 13:13 To:

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread John McKown
On Thu, Feb 1, 2018 at 6:55 AM, Chris Green wrote: > I want to get Sun, Mon, Tue, Wed etc. from a date, what's the easiest > way of doing this in a sqlite select? > > I guess I can do something (horrible?) with the numeric day of week > and substr() but is there not an easier way?

[sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Chris Green
I want to get Sun, Mon, Tue, Wed etc. from a date, what's the easiest way of doing this in a sqlite select? I guess I can do something (horrible?) with the numeric day of week and substr() but is there not an easier way? -- Chris Green · ___