Birthday

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Birthday

Guillermo Fernandez Castellanos

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 message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Birthday

Julio Nobrega

  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
<[hidden email]> wrote:

>
> 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
>
> >
>


--
Julio Nobrega - http://www.inerciasensorial.com.br

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Birthday

kenneth gonsalves
In reply to this post by Guillermo Fernandez Castellanos


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?

store it as DateField - most convenient - i woulld think you would  
use more space and more scripting time storing only day month

--

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Birthday

Antonio Cavedoni
In reply to this post by Guillermo Fernandez Castellanos

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 DateField looks like what you want: instead of storing just day and  
month, why not store also the year somebody was born? That way you  
can calculate stuff like “ZOMG, it’s your 27th birthday, you’re  
getting old!” :-)

Cheers.
--
Antonio



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Birthday

Guillermo Fernandez Castellanos

Hi,

I think I am going to go to the DateField solution.
I did not want to store the year because:
1) I do not know the years of all my friends, although I know the days.
2) Not everyone likes everybody to see how old they are :-)

Thanks all for your answer.

G

On 10/13/06, Antonio Cavedoni <[hidden email]> 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 fields? Or should I use another solution?
>
> A DateField looks like what you want: instead of storing just day and
> month, why not store also the year somebody was born? That way you
> can calculate stuff like "ZOMG, it's your 27th birthday, you're
> getting old!" :-)
>
> Cheers.
> --
> Antonio
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---