On 6/22/2014 4:03 AM, Erick T. Barkhuis wrote:> Arno Welzel:> >> 1967-09-12 for the 9. September of 1967>> BTW: This is why ISO 8601 had been invented > > If that's the case, I don't like ISO 8601.> > >

> On 6/22/2014 4:03 AM, Erick T. Barkhuis wrote:>> Arno Welzel:>> >>> 1967-09-12 for the 9. September of 1967>>> BTW: This is why ISO 8601 had been invented >> >> If that's the case, I don't like ISO 8601.> > Why not, Erick? It's a good format which sorts naturally.

But apparently, it wants date formats to be three days off!
It might sort naturally, but it's not accurate enough.

> On 6/22/2014 10:24 AM, Erick T. Barkhuis wrote:>> Jerry Stuckle:>> >>> On 6/22/2014 4:03 AM, Erick T. Barkhuis wrote:>>>> Arno Welzel:>>>> >>>> > 1967-09-12 for the 9. September of 1967>>>> > BTW: This is why ISO 8601 had been invented >>>> >>>> If that's the case, I don't like ISO 8601.>>> >>> Why not, Erick? It's a good format which sorts naturally.>> >> But apparently, it wants date formats to be three days off!>> It might sort naturally, but it's not accurate enough.>> >> > > No, "9" is September. The full date is September 12th, 1967. The> difference in languages and punctuation is causing confusion.

Obviously!
Arno is german. In Germany, it's common to write a dot as abbreviation
for 'st', 'nd', 'rd' and 'th':
He would pronounce "9. September" as "der neunte September" (the ninth
of September).

[Now that I have to explain this, it ain't funny anymore: Arno wrote
1967-09-12 and claimed this to be equal to the ninth of September 1967.
That prompted me, since I sometimes like to see funny things where they
aren't, to claim that ISO 8601 is no good at all, if it defines date
formats three days off]

On 22 Jun 2014 14:24:12 GMT, "Erick T. Barkhuis"
<erick(dot)use-net(at)ardane(dot)c(dot)o(dot)m> wrote in comp.databases.mysql:>>>> 1967-09-12 for the 9. September of 1967> > But apparently, it wants date formats to be three days off!

> Erick T. Barkhuis, 2014-06-22 10:03:> >> Arno Welzel:>> >>> 1967-09-12 for the 9. September of 1967>>> BTW: This is why ISO 8601 had been invented >> >> If that's the case, I don't like ISO 8601.> > Of course it was just a typo and 1967-09-12 is for 12. September of 1967 ;-)

But how are us humans supposed to know which comes first?
what if you see 1967-31-09?
if it read 1967-Sep-09 then there is no guessing is there?

> richard, 2014-06-21 20:28:> >> On Sat, 21 Jun 2014 17:42:29 +0000 (UTC), Doug Miller wrote:>> >>> richard <noreply(at)example(dot)com> wrote in news:1mddkhwt2mr0v$.1m6eithcu7iod.dlg@>>> 40tude.net:>>> >>>> As for the date usage on MY database tables, I am only using a date as a>>>> reference.>>> >>> Patently false, as you have posted questions here asking for help resolving your problems in >>> sorting by the date.>>> >>>> I really don't give a damn what your philosophy or ideals are>>>> behind the so called "proper ways" of obtaining a date.>>> >>> Which is exactly *why* you have problems sorting by the date.>> >> The problem with sorting is, it treats any value given as a string, then>> determines which has the lowest value in total.>> 1>> 2>> 3>> 10>> 20>> 30>> 100>> 200>> 300> > That's why *thinking* about how to store information is important.> > Even if you don't like to use a date datatype you should store the date> values in a way that they can be used for sorting - so year first, then> month, then day and all with leading zeros:> > 2014-06-22 for the 22. June of 2014> 1967-09-12 for the 9. September of 1967> > and so on.> > BTW: This is why ISO 8601 had been invented - see> <http://en.wikipedia.org/wiki/ISO_8601>.

Doesn't matter anymore. I am using the numeric day system instead.
where $date=date(z).

On Sun, 22 Jun 2014 13:55:49 -0400, richard <noreply(at)example(dot)com> wrote
in comp.databases.mysql:>>>> BTW: This is why ISO 8601 had been invented >> Of course it was just a typo and 1967-09-12 is for 12. September of 1967 ;-)> > But how are us humans supposed to know which comes first?

Simple: because it is unambiguously defined in ISO 8601.

> what if you see 1967-31-09?

Then you are not seeing a valid date in ISO-8601 format.

> if it read 1967-Sep-09 then there is no guessing is there?

Yes there is, because in many languages "Sep" doesn't make any sense.
Furthermore obviously dates in that format cannot be sorted easily.

> On Sun, 22 Jun 2014 16:47:36 +0200, Arno Welzel wrote:> >> Erick T. Barkhuis, 2014-06-22 10:03:>> >>> Arno Welzel:>>> >>>> 1967-09-12 for the 9. September of 1967 BTW: This is why ISO 8601 had>>>> been invented>>> >>> If that's the case, I don't like ISO 8601.>> >> Of course it was just a typo and 1967-09-12 is for 12. September of>> 1967 ;-)> > But how are us humans supposed to know which comes first? what if you> see 1967-31-09?

If you know it's an iso 8601 date then you know that the first 4 digits
(1967) are the year, the next 2 digits (31) are the month and the last 2
digits (09) are the day number.

> if it read 1967-Sep-09 then there is no guessing is there?

1967-sep-09 is not an iso 8601 date.

Iso 8601 defines a date as:

[4 digit Year Number][-][2 digit Month Number][-][2 digit Day Number]

So if "1967-31-09" was valid in iso 8601 it would actually be
"1969-07-09" or the 9th of July 1969, because July 1969 is the 31st month
starting at January 1967.

The reason iso 8601 is good is that in the string form, iso 8601 dates
sort properly, ie ascending / descending string order is also ascending /
descending date order. If you don't understand this, you obviously don't
understand anything about string sorting either.

> On Sun, 22 Jun 2014 16:47:36 +0200, Arno Welzel wrote:> >> Erick T. Barkhuis, 2014-06-22 10:03:>> >>> Arno Welzel:>>> >>>> 1967-09-12 for the 9. September of 1967>>>> BTW: This is why ISO 8601 had been invented >>> >>> If that's the case, I don't like ISO 8601.>> >> Of course it was just a typo and 1967-09-12 is for 12. September of 1967 ;-)> > But how are us humans supposed to know which comes first?

On Sun, 22 Jun 2014 15:30:48 -0700, Jürgen Exner wrote:> On Sun, 22 Jun 2014 14:05:40 -0400, richard <noreply(at)example(dot)com> wrote> in comp.databases.mysql:>> Doesn't matter anymore. I am using the numeric day system > > Now, what on earth is a "numeric day system"? Earlier you claimed you> were using the Julian calender. Now, what is it?

Nah, he didn't say he was using Julian; he was just throwing up a dummy
argument against using actual DATE columns. Half of his proposals and
criteria are shit-arguments that exist only to provide inconvenient
circumstances.

--
"25 grams of wafers and 20 ml of wine undergo transubstantiation and
become the flesh and blood of our Lord. How many Joules of heat are
released by the transformation?" --Theological Physics exam, 1997

> richard, 2014-06-22 20:05:> >> On Sun, 22 Jun 2014 08:53:17 +0200, Arno Welzel wrote:>> > [about date storage in databases]>>> BTW: This is why ISO 8601 had been invented - see>>> <http://en.wikipedia.org/wiki/ISO_8601>.>> >> Doesn't matter anymore. I am using the numeric day system instead.>> where $date=date(z).> > Really? Literally "where $date=date(z)"? Looks very unusual.> > And even if this would make any sense - it least in MySQL date() is> *not* a "numeric day system":> > < http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#functio n_date>> > Or did you switch to another database system?

Day --- ---
d Day of the month, 2 digits with leading zeros 01 to 31
D A textual representation of a day, three letters Mon through Sun
j Day of the month without leading zeros 1 to 31
l (lowercase 'L') A full textual representation of the day of the week
Sunday through Saturday
N ISO-8601 numeric representation of the day of the week (added in PHP
5.1.0) 1 (for Monday) through 7 (for Sunday)
S English ordinal suffix for the day of the month, 2 characters st, nd,
rd or th. Works well with j
w Numeric representation of the day of the week 0 (for Sunday) through 6
(for Saturday)
z The day of the year (starting from 0) 0 through 365

> richard, 2014-06-22 20:05:> >> On Sun, 22 Jun 2014 08:53:17 +0200, Arno Welzel wrote:>> > [about date storage in databases]>>> BTW: This is why ISO 8601 had been invented - see>>> <http://en.wikipedia.org/wiki/ISO_8601>.>> >> Doesn't matter anymore. I am using the numeric day system instead.>> where $date=date(z).> > Really? Literally "where $date=date(z)"? Looks very unusual.> > And even if this would make any sense - it least in MySQL date() is> *not* a "numeric day system":> > < http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#functio n_date>> > Or did you switch to another database system?

BTW, date() itself is not anything but a function.
date(z) takes the current date of the server and trasnform it into a number
in the range of 1 to 366.

If the date were 2014-01-01, date(z) would return 1.
Dayofyear() takes that number and transform it back to the calendar date.

In my use of "where", I meant that as "an example", not as used by mysql
select from where stuff.

[...]> BTW, date() itself is not anything but a function.> date(z) takes the current date of the server and trasnform it into a number> in the range of 1 to 366.> > If the date were 2014-01-01, date(z) would return 1.> Dayofyear() takes that number and transform it back to the calendar date.

Yep - but only for the current year. Next year 1 would meen 2015-01-01
and so on.

In article <53A7C563(dot)6050901(at)arnowelzel(dot)de>, usenet(at)arnowelzel(dot)de
says...> > richard, 2014-06-23 05:04:> > [...]>> BTW, date() itself is not anything but a function.>> date(z) takes the current date of the server and trasnform it into a number>> in the range of 1 to 366.>> >> If the date were 2014-01-01, date(z) would return 1.>> Dayofyear() takes that number and transform it back to the calendar date.> > Yep - but only for the current year. Next year 1 would meen 2015-01-01> and so on.

Doesn't the MySQL DATEOFYEAR() function actually take a DATE data type
input and return a number (in range 1-366)?

Unless of course Richard is talking about some weird non-mysql PHP
function he has cobbled together.

> In article <53A7C563(dot)6050901(at)arnowelzel(dot)de>, usenet(at)arnowelzel(dot)de> says...>> >> richard, 2014-06-23 05:04:>> >> [...]>>> BTW, date() itself is not anything but a function.>>> date(z) takes the current date of the server and trasnform it into a number>>> in the range of 1 to 366.>>> >>> If the date were 2014-01-01, date(z) would return 1.>>> Dayofyear() takes that number and transform it back to the calendar date.>> >> Yep - but only for the current year. Next year 1 would meen 2015-01-01>> and so on.> > Doesn't the MySQL DATEOFYEAR() function actually take a DATE data type > input and return a number (in range 1-366)?> > Unless of course Richard is talking about some weird non-mysql PHP > function he has cobbled together.> > GM

You certainly have helped on that.
Just because SQL or other lamguages use a common every day word in its
structure does not mean that is the only way that word can be used.
Arno took the context and wrongfully assumed that I was referring to the
use of "where" in the select statement.This is not what I was using the
word for.
And all you do is add agitation to it all purely for wanting to make things
worse than they are.

>> bullis, you better learn SQL and PHP REAL quick, because you're>> alienating the entire group here.> > You certainly have helped on that.

Take responsibility for your actions, bullis. You calling the regulars
here dumbshits, creating sock puppets when people refuse to help you,
and insulting everyone here means you are 100% responsible for
alienating people here.

> Just because SQL or other lamguages use a common every day word in its> structure does not mean that is the only way that word can be used.> Arno took the context and wrongfully assumed that I was referring to the> use of "where" in the select statement.This is not what I was using the> word for.

Oh. I misunderstood. In that case, you were fully justified in calling
Arno a dumbshit. </sarcasm>

> And all you do is add agitation to it all purely for wanting to make things> worse than they are.

See my first paragraph. You can only blame yourself.
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.

On Mon, 23 Jun 2014 07:58:20 -0400, richard <noreply(at)example(dot)com> wrote
in comp.databases.mysql:>>> richard, 2014-06-23 05:04:>>>> BTW, date() itself is not anything but a function.>>>> date(z) takes the current date of the server and trasnform it into a number>>>> in the range of 1 to 366.>>>> Dayofyear() takes that number and transform it back to the calendar date.> > As I get told so frequently, RTFM asshole!

> On Mon, 23 Jun 2014 07:58:20 -0400, richard <noreply(at)example(dot)com> wrote> in comp.databases.mysql:>>>> richard, 2014-06-23 05:04:>>>> > BTW, date() itself is not anything but a function.>>>> > date(z) takes the current date of the server and trasnform it into a number>>>> > in the range of 1 to 366.>>>> > Dayofyear() takes that number and transform it back to the calendar date.>> >> As I get told so frequently, RTFM asshole!> > I tried. But unfortunately I couldn't find said functions with said> functionality at> http://dev.mysql.com/doc/refman/5.7/en/language-structure.html

richard is referring to PHP's date[1] function. This should correctly
be called with a string argument (not a constant, as written above), e.g.

It's attribution *line*, _not_ attribution novel. Please adjust/fix your
newsreader or switch to one that allows you to not make life harder for your
readers.

>>>> > BTW: This is why ISO 8601 had been invented>>> Of course it was just a typo and 1967-09-12 is for 12. September of 1967>>> ;-)>> >> But how are us humans supposed to know which comes first?> > Simple: because it is unambiguously defined in ISO 8601.
^^^^^^^^^^^^^
Which is why …

>> what if you see 1967-31-09?> > Then you are not seeing a valid date in ISO-8601 format.

… that statement is wrong.

The ISO 8601 date format is unambiguously defined because it always has the
year number (Y), followed by the month number (M), optionally followed by
the day-of-month number (D): YYYY-MM-DD or YYYYMMDD. Whereas YYYY, YYYY-MM,
YY-MM-DD, and YYMMDD had been allowed, but the latter two were recommended
against and have been abolished in 2004 CE.

There is no YYYY-DD-MM format specified there, and since there are only 12
months in the Gregorian calendar, there cannot be a 31st.

Geoff Muldoon <geoff(dot)muldoon(at)trap(dot)gmail(dot)com> wrote:
^^^^^^^^^^^^^^
The “From” header field value must contain a proper e-mail address. I do
not think Google will take kindly on your misusing their namespace. Such
header field values are also expressly forbidden at albasani.net.

>> richard, 2014-06-23 05:04:>> [...]>>> BTW, date() itself is not anything but a function.>>> date(z) takes the current date of the server and trasnform it into a>>> number in the range of 1 to 366.>>> >>> If the date were 2014-01-01, date(z) would return 1.>>> Dayofyear() takes that number and transform it back to the calendar>>> date.>> >> Yep - but only for the current year. Next year 1 would meen 2015-01-01>> and so on.> > Doesn't the MySQL DATEOFYEAR() function actually take a DATE data type> input and return a number (in range 1-366)?