Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #13930 > unrolled thread
| Started by | richard <noreply@example.com> |
|---|---|
| First post | 2014-06-20 10:20 -0400 |
| Last post | 2014-06-22 08:45 +0200 |
| Articles | 13 on this page of 73 — 17 participants |
Back to article view | Back to comp.lang.php
Putting it all together richard <noreply@example.com> - 2014-06-20 10:20 -0400
Re: Putting it all together Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-20 08:11 -0700
Re: Putting it all together richard <noreply@example.com> - 2014-06-20 11:24 -0400
Re: Putting it all together Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-06-20 17:15 +0000
Re: Putting it all together Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-20 20:01 -0700
Re: Putting it all together Jürgen Exner <jurgenex@hotmail.com> - 2014-06-20 08:21 -0700
Re: Putting it all together Norman Peelman <npeelman@cfl.rr.com> - 2014-06-20 21:06 -0400
Re: Putting it all together Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-21 03:02 +0000
Re: Putting it all together Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-21 03:09 +0000
Re: Putting it all together Jürgen Exner <jurgenex@hotmail.com> - 2014-06-20 20:13 -0700
Re: Putting it all together richard <noreply@example.com> - 2014-06-20 23:34 -0400
Re: Putting it all together Jürgen Exner <jurgenex@hotmail.com> - 2014-06-20 20:48 -0700
Re: Putting it all together Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-20 21:00 -0700
Re: Putting it all together Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-06-21 04:22 +0000
Re: Putting it all together Jürgen Exner <jurgenex@hotmail.com> - 2014-06-20 22:11 -0700
Re: Putting it all together Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-20 22:39 -0700
Re: Putting it all together gordonb.zp2md@burditt.org (Gordon Burditt) - 2014-06-21 04:15 -0500
Storing dates (was: Putting it all together) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-21 12:15 +0200
Re: Storing dates richard <noreply@example.com> - 2014-06-21 11:10 -0400
Re: Storing dates Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-06-21 17:42 +0000
Re: Storing dates richard <noreply@example.com> - 2014-06-21 14:28 -0400
Re: Storing dates Jürgen Exner <jurgenex@hotmail.com> - 2014-06-21 12:04 -0700
Re: Storing dates Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-06-21 19:06 +0000
Re: Storing dates Tim Streater <timstreater@greenbee.net> - 2014-06-21 22:06 +0100
Re: Storing dates Jerry Stuckle <jstucklex@attglobal.net> - 2014-06-21 17:09 -0400
Re: Storing dates Tim Streater <timstreater@greenbee.net> - 2014-06-21 22:33 +0100
Re: Storing dates Jerry Stuckle <jstucklex@attglobal.net> - 2014-06-21 17:49 -0400
Re: Storing dates Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-22 14:38 +0200
Re: Storing dates Jürgen Exner <jurgenex@hotmail.com> - 2014-06-21 14:31 -0700
Re: Storing dates Tim Streater <timstreater@greenbee.net> - 2014-06-21 22:44 +0100
Re: Storing dates Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-22 14:59 +0200
Re: Storing dates Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-21 23:19 +0000
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-22 08:53 +0200
Re: Storing dates "Erick T. Barkhuis" <erick.use-net@ardane.c.o.m> - 2014-06-22 08:03 +0000
Re: Storing dates Jerry Stuckle <jstucklex@attglobal.net> - 2014-06-22 09:29 -0400
Re: Storing dates "Erick T. Barkhuis" <erick.use-net@ardane.c.o.m> - 2014-06-22 14:24 +0000
Re: Storing dates Jerry Stuckle <jstucklex@attglobal.net> - 2014-06-22 10:32 -0400
Re: Storing dates "Erick T. Barkhuis" <erick.use-net@ardane.c.o.m> - 2014-06-22 14:45 +0000
Re: Storing dates Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-22 19:44 +0000
Re: Storing dates Jürgen Exner <jurgenex@hotmail.com> - 2014-06-22 08:26 -0700
Re: Storing dates gordonb.q26od@burditt.org (Gordon Burditt) - 2014-06-22 10:00 -0500
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-22 16:47 +0200
Re: Storing dates richard <noreply@example.com> - 2014-06-22 13:55 -0400
Re: Storing dates Jürgen Exner <jurgenex@hotmail.com> - 2014-06-22 12:31 -0700
Re: Storing dates Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-24 22:27 +0200
Re: Storing dates Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-22 19:52 +0000
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-22 21:52 +0200
Re: Storing dates richard <noreply@example.com> - 2014-06-22 14:05 -0400
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-22 21:56 +0200
Re: Storing dates richard <noreply@example.com> - 2014-06-22 22:46 -0400
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-23 08:11 +0200
Re: Storing dates richard <noreply@example.com> - 2014-06-23 02:37 -0400
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-23 11:10 +0200
Re: Storing dates Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-23 06:50 -0700
Re: Storing dates richard <noreply@example.com> - 2014-06-23 11:13 -0400
Re: Storing dates Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-06-23 09:13 -0700
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-23 22:33 +0200
Re: Storing dates richard <noreply@example.com> - 2014-06-22 23:04 -0400
Re: Storing dates Arno Welzel <usenet@arnowelzel.de> - 2014-06-23 08:12 +0200
Re: Storing dates Geoff Muldoon <geoff.muldoon@trap.gmail.com> - 2014-06-23 16:45 +1000
Re: Storing dates richard <noreply@example.com> - 2014-06-23 07:58 -0400
Re: Storing dates Jürgen Exner <jurgenex@hotmail.com> - 2014-06-23 09:50 -0700
Re: Storing dates Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-23 19:02 +0200
Re: Storing dates Geoff Muldoon <geoff.muldoon@trap.gmail.com> - 2014-06-24 12:00 +1000
Re: Storing dates Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-24 22:38 +0200
Re: Storing dates Jürgen Exner <jurgenex@hotmail.com> - 2014-06-22 15:30 -0700
Re: Storing dates "Peter H. Coffin" <hellsop@ninehells.com> - 2014-06-22 20:10 -0500
Re: Putting it all together Jürgen Exner <jurgenex@hotmail.com> - 2014-06-21 03:34 -0700
Re: Putting it all together Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-21 10:23 +0000
Re: Putting it all together bill <william@TechServSys.com> - 2014-06-21 07:03 -0400
Re: Putting it all together Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-21 15:11 +0000
Re: Putting it all together "Peter H. Coffin" <hellsop@ninehells.com> - 2014-06-21 10:57 -0500
Re: Putting it all together Arno Welzel <usenet@arnowelzel.de> - 2014-06-22 08:45 +0200
Page 4 of 4 — ← Prev page 1 2 3 [4]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2014-06-23 07:58 -0400 |
| Subject | Re: Storing dates |
| Message-ID | <x8ho1i1kpop.1lbnaaunxn171$.dlg@40tude.net> |
| In reply to | #14010 |
On Mon, 23 Jun 2014 16:45:23 +1000, Geoff Muldoon wrote: > In article <53A7C563.6050901@arnowelzel.de>, usenet@arnowelzel.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 As I get told so frequently, RTFM asshole!
[toc] | [prev] | [next] | [standalone]
| From | Jürgen Exner <jurgenex@hotmail.com> |
|---|---|
| Date | 2014-06-23 09:50 -0700 |
| Subject | Re: Storing dates |
| Message-ID | <mfmgq95el8ea0bcpirjnr5t46rppuheora@4ax.com> |
| In reply to | #14012 |
On Mon, 23 Jun 2014 07:58:20 -0400, richard <noreply@example.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 jue
[toc] | [prev] | [next] | [standalone]
| From | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-06-23 19:02 +0200 |
| Subject | Re: Storing dates |
| Message-ID | <53a85d9c$0$6669$9b4e6d93@newsspool3.arcor-online.net> |
| In reply to | #14019 |
Jürgen Exner wrote:
> On Mon, 23 Jun 2014 07:58:20 -0400, richard <noreply@example.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.
date('z')
And, of course, PHP stuff shouldn't be discussed in
comp.databases.mysql, so xpost & fup2 comp.lang.php.
[1] <http://www.php.net/manual/en/function.date.php>
--
Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Geoff Muldoon <geoff.muldoon@trap.gmail.com> |
|---|---|
| Date | 2014-06-24 12:00 +1000 |
| Subject | Re: Storing dates |
| Message-ID | <MPG.2e1386bd494abe6ad0@news.albasani.net> |
| In reply to | #14012 |
Richard noreply@example.com says... > >>> If the date were 2014-01-01, date(z) would return 1. > >>> Dayofyear() takes that number and transform it back to the calendar date. > > Doesn't the MySQL DATEOFYEAR() function actually take a DATE data type > > input and return a number (in range 1-366)? > As I get told so frequently, RTFM asshole! Do you mean this? http://dev.mysql.com/doc/refman/5.5/en/date-and-time- functions.html#function_dayofyear I can't find any in-built PHP function of that name, please post a link to said manual entry. Arsehole. GM
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-06-24 22:38 +0200 |
| Subject | Re: Storing dates |
| Message-ID | <4486398.v5FkVC2umb@PointedEars.de> |
| In reply to | #14010 |
Geoff Muldoon <geoff.muldoon@trap.gmail.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.
<http://www.interhack.net/pubs/munging-harmful/>
<http://albasani.net/info/terms_of_use.html.en>
> In article <53A7C563.6050901@arnowelzel.de>, usenet@arnowelzel.de
> says...
It’s attribution *line*, _not_ attribution novel.
>> 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)?
Yes, it does not; there is no such MySQL function. Probably you mean
<http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_dayofyear>
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
[toc] | [prev] | [next] | [standalone]
| From | Jürgen Exner <jurgenex@hotmail.com> |
|---|---|
| Date | 2014-06-22 15:30 -0700 |
| Subject | Re: Storing dates |
| Message-ID | <s5meq95ejmn5ivtpc89u4kmntett93dmug@4ax.com> |
| In reply to | #13994 |
On Sun, 22 Jun 2014 14:05:40 -0400, richard <noreply@example.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? Mind to make up your mind? jue
[toc] | [prev] | [next] | [standalone]
| From | "Peter H. Coffin" <hellsop@ninehells.com> |
|---|---|
| Date | 2014-06-22 20:10 -0500 |
| Subject | Re: Storing dates |
| Message-ID | <slrnlqevk4.gcf.hellsop@nibelheim.ninehells.com> |
| In reply to | #14000 |
On Sun, 22 Jun 2014 15:30:48 -0700, Jürgen Exner wrote: > On Sun, 22 Jun 2014 14:05:40 -0400, richard <noreply@example.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
[toc] | [prev] | [next] | [standalone]
| From | Jürgen Exner <jurgenex@hotmail.com> |
|---|---|
| Date | 2014-06-21 03:34 -0700 |
| Message-ID | <4knaq9lk9ud43ibqo05dhgrahehkrhegbr@4ax.com> |
| In reply to | #13949 |
On Sat, 21 Jun 2014 04:15:04 -0500, gordonb.zp2md@burditt.org (Gordon Burditt) wrote in comp.databases.mysql: >> Why would anyone store a date in a MySQL >> database using any data type other than DATE or DATETIME? > >Since the Julian calendar [...] Careful! The Julian calender is something very different from a Julian day. Now, having said that, the OP used the term "Julian date", and it is not absoluty clear if he meant a day in the Julian calender or a Julian day. But I interpret it as a Julian day, because a day in the Julian calender makes even less sense. jue
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2014-06-21 10:23 +0000 |
| Message-ID | <lo3mf1$6a7$1@dont-email.me> |
| In reply to | #13943 |
On Fri, 20 Jun 2014 23:34:19 -0400, richard wrote: > what if use Julian dates? > that throws all of your damn bullshit right down the drain don't it? No, it doesn't change anything. As long as you store the dates using an appropriate datatype for a date, you can sort by date. Whether you call it date and store a datetime, or call it date and store a julian date as a number from some arbitrary epoch is irrelevant. Your mistake is in storing dates as strings and then expecting string sort to sort them in date order. You've been given a workround for this at least twice which would only need you to wrap the column name date in your order by clause with a suitable conversion function. If instead you want to make more mistakes with julian dates, well who are we to stand in your way. But when you start asking for help in sorting out your julian dates, I reserve the non exclusive right to tell tell you to see previous discussions and stop being an arse. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | bill <william@TechServSys.com> |
|---|---|
| Date | 2014-06-21 07:03 -0400 |
| Message-ID | <lo3op7$cpo$2@speranza.aioe.org> |
| In reply to | #13943 |
On 6/20/2014 11:34 PM, richard wrote: > > what if use Julian dates? > that throws all of your damn bullshit right down the drain don't it? > Actually using an ISO date would be better
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2014-06-21 15:11 +0000 |
| Message-ID | <lo47b6$k8a$1@dont-email.me> |
| In reply to | #13953 |
On Sat, 21 Jun 2014 07:03:04 -0400, bill wrote: > On 6/20/2014 11:34 PM, richard wrote: >> what if use Julian dates? >> that throws all of your damn bullshit right down the drain don't it? > Actually using an ISO date would be better Actually, in richard's case, forgetting about databases and using csv text files instead would be better. And some sort of log file for his hit tracker. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | "Peter H. Coffin" <hellsop@ninehells.com> |
|---|---|
| Date | 2014-06-21 10:57 -0500 |
| Message-ID | <slrnlqbaqs.gcf.hellsop@nibelheim.ninehells.com> |
| In reply to | #13943 |
On Fri, 20 Jun 2014 23:34:19 -0400, richard wrote: > On Fri, 20 Jun 2014 20:13:10 -0700, Jürgen Exner wrote: > >> On Fri, 20 Jun 2014 10:20:59 -0400, richard <noreply@example.com> >> wrote in comp.databases.mysql: >> >>>For this excercise, I decided to order by artist I'll do it by date . >>>later . >> >> That should be as simple as SELECT .... FROM ...... ORDER BY date >> >> Of course that assumes that date is of type date (or datetime) as any >> sane person would store a date. >> >> jue > > what if use Julian dates that throws all of your damn bullshit right ? > down the drain don't it ? I'll write it for you when you come up with an audio recording made before October 1582. -- "... I've seen Sun monitors on fire off the side of the multimedia lab. I've seen NTU lights glitter in the dark near the Mail Gate. All these things will be lost in time, like the root partition last week. Time to die...". -- Peter Gutmann in the scary.devil.monastery
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2014-06-22 08:45 +0200 |
| Message-ID | <53A67B9C.7020205@arnowelzel.de> |
| In reply to | #13943 |
richard, 2014-06-21 05:34: > On Fri, 20 Jun 2014 20:13:10 -0700, Jürgen Exner wrote: > >> On Fri, 20 Jun 2014 10:20:59 -0400, richard <noreply@example.com> wrote >> in comp.databases.mysql: >> >>> For this excercise, I decided to order by artist. >>> I'll do it by date later. >> >> That should be as simple as >> SELECT .... FROM ...... ORDER BY date >> >> Of course that assumes that date is of type date (or datetime) as any >> sane person would store a date. >> >> jue > > what if use Julian dates? Then use TO_DAYS(date)+1721060 in MySQL. Or vice versa FROM_DAYS(date-1721060) to convert from julian date. > that throws all of your damn bullshit right down the drain don't it? Nope. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de
[toc] | [prev] | [standalone]
Page 4 of 4 — ← Prev page 1 2 3 [4]
Back to top | Article view | comp.lang.php
csiph-web