PM
To: django-users@googlegroups.com
Subject: Re: How to get as result a list of all the users ordered by birthday
(month day), ignoring year
Hi Roberta,
I haven't tested it but assuming you want the ordering to happen within the
database you may be able to do it with a combinatio
com/doc/refman/5.7/en/mathematical-functions.html#function_mod>
.
Something like MOD( TIMESTAMPDIFF( 'SECOND', birthday, '1900-01-01'),
31556951) assuming you're using MySQL.
On average there are 365.2425 days per year, which equates to 31,556,951
seconds.
Dan
On 2
gt;
>
> On Friday, November 17, 2017 at 7:19:43 AM UTC-5, Roberta Takenaka Granero
> wrote:
>>
>> In models:
>>
>> birthday = models.DateField()
>>
>> def birthday_month_day(self):
>> # returns month and day
>> retu
https://stackoverflow.com/questions/4236226/ordering-a-django-queryset-by-a-datetimes-month-day
On Friday, November 17, 2017 at 7:19:43 AM UTC-5, Roberta Takenaka Granero
wrote:
>
> In models:
>
> birthday = models.DateField()
>
> def birthday_month_day(self):
> #
In models:
birthday = models.DateField()
def birthday_month_day(self):
# returns month and day
return '12-31'
In views, I expect to see something pythonic like this:
User.objects.all().order_by('birthday_month_day')
I know it does not work because birthda
On Fri, Feb 18, 2011 at 2:12 PM, Gabriel Gunderson wrote:
> We'll be gathering Monday to have pizza, giant subs, spam with eggs**,
> and a specially commissioned Python-themed cake by Joseph Hall of 3D
> TuxCake fame[2].
Heh, I thought I'd share a cake update. We're going to need some help
eati
What: Python's 20th Birthday (well, public release birthday)
Extravaganza Lunch Party!
When: Monday at 12:15
Where: Izeni. We're located at the Novell TCN, also known as the
building formerly known as OSTC, also known as (but not really
numbered as) building A. (Campus Map:
htt
Facebook app give feedback -Send birthday cards to buds
http://apps.facebook.com/groupcards/start
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
<[EMAIL PROTECTED]> wrote:
>
> On 13 Oct 2006, at 0:24, Guillermo Fernandez Castellanos wrote:
> > I am trying to keep a birthday field in the database. But i am only
> > interested in the day and month. Is there a way of using a DateField
> > but only with day and month f
On 13 Oct 2006, at 0:24, Guillermo Fernandez Castellanos wrote:
> I am trying to keep a birthday field in the database. But i am only
> interested in the day and month. Is there a way of using a DateField
> but only with day and month fields? Or should I use another solution?
A DateFi
On 13-Oct-06, at 3:54 AM, Guillermo Fernandez Castellanos wrote:
> I am trying to keep a birthday field in the database. But i am only
> interested in the day and month. Is there a way of using a DateField
> but only with day and month fields? Or should I use another solution?
st
You could use an SmallInteger field and store MMDD... or use a date
field and default they Year value to some number, like 2000...
On 10/12/06, Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to keep a birthday field in the datab
Hi,
I am trying to keep a birthday field in the database. But i am only
interested in the day and month. Is there a way of using a DateField
but only with day and month fields? Or should I use another solution?
Thanks,
G
--~--~-~--~~~---~--~~
You received this
Yup, that works a treat Thanks James!!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, se
On 6/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> However, this only works if the Member was actually born on this exact
> date (including year)... how can I filter so that it ignores the year
> and just looks at the day and month part of their birth_date??
d = datetime.date.today()
memb
Hi all,
I'm relatively new to Django, so bear with me...
I'm building an app for a band website that lists details about the
band members.
I thought it'd be nice to have a Happy Birthday message display if
today was a members birthday and have built an array like so:
mem
16 matches
Mail list logo