What would be the more proper way of storing birthday data? It will be
used to send out birthday messages for customers ("Happy 30th birthday,
Sam!"). But the date of birth is not necessarily known (in which case,
we will only send out "Happy birthday, Sam!").
I prefer using the builtin date type instead of three smallints. But I
don't like having to arbitrarily set, say, year 1000 AD or 1 BC to
represent "unknown year".
Any thoughts?
--
dave
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org) 2 2488
David Garamond wrote: What would be the more proper way of storing birthday data? It will be used to send out birthday messages for customers ("Happy 30th birthday, Sam!"). But the date of birth is not necessarily known (in which case, we will only send out "Happy birthday, Sam!").
I prefer using the builtin date type instead of three smallints. But I don't like having to arbitrarily set, say, year 1000 AD or 1 BC to represent "unknown year".
Any thoughts?
How about NULL?
/Björn
Christopher Petrilli wrote: What would be the more proper way of storing birthday data? It will be used to send out birthday messages for customers ("Happy 30th birthday, Sam!"). But the date of birth is not necessarily known (in which case, we will only send out "Happy birthday, Sam!").
I prefer using the builtin date type instead of three smallints. But I don't like having to arbitrarily set, say, year 1000 AD or 1 BC to represent "unknown year". Well if you make the column nullable, then you can detect that when you retreive it.
Which column? If I use a single date column and set it nullable, I won't
be able to say "date of month and month is known, but year is unknown".
Anyway, I think I'll go with the single date column way.
You could also, if you don't want that, use a second column to indicate that it's been set.
--
dave
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sandra |
last post by:
I was given this problem for extra credit and I am just stuck !
BTW - I am not asking for source code and I am not asking anyone to do
my homework as I do want to learn .. I just need a hint or two to get
moving and I need to know if what I have written so far is leading me
in the right direction ~
Ok - The problem is to find out how many people need to be in a room
for a 95% chance that someone in that room will match my birthday
I...
|
by: Claude Alain |
last post by:
Hello!
We are a small non-profit organisation with about 400 members. We have
created a database using Access97 which contains tombstone information on
our members, including home adresses and birthdates. We would like to
produce monthly reports providing us with a list of all members whose
birthdate is coming up during any given month in order to send those members
a birthday card in a labelled enveloppe. The best we have come up with...
|
by: edwin van rutten |
last post by:
Hi
I have a personal database of all adresses etceteras of personal contacts
and want to sort the birthday dates in such a way that I have a
chronological list for this years birthdays. The problem I now encounter is
that the system takes the years into account.
I already was thinking of exporting to outlook to get this done, but I think
there must be a smarter way
|
by: Adrian |
last post by:
I hit on this problem converting a VB.NET insurance application to C#.
Age next birthday calculated from date of birth is often needed in
insurance premium calculations.
Originally done using DateDiff in VB.NET which is only available in C#
if you don't mind linking in Microsoft.VisualBasic.dll to your C#
application.
I wanted to avoid this so set about a pure C# solution which uses a
combination of TimeSpan in whole days and the...
|
by: Crirus |
last post by:
I have ~200 players on a server...
They share the same 512x512 tiles map...
Each player have an explored area and a visible area... visible area is
given by players's current units and buildings...
Now, I'm facing with the problem of how to store does areas...
One way is to keep a explored(512,512) array of booleans... each
explored(i,j)=True mean player explored the tile on (i.j)... the same for
visible...
| |
by: Wolf |
last post by:
Hi
I am using the outlook add in for vs.net 2005 and outlook 2003.
I am creating contacts in outlook from our system
The clients want to see only the birthdate's and dont want to be bugged
by birthday reminders.
Automatically when you insert a birthday for a contact, it sets a
|
by: NomoreSpam4Me |
last post by:
Hi, i did a search and find the way to get the birthday without the
year.
My field is yyyy/mm/dd, (birthday). I also have a day field (1 to 31)
and a month field. (1 to 12)
My problem is: I can get the birthday for one month in particular, but
i would like to be able to get birthday for a week that goes over 2
month.
|
by: kestrel |
last post by:
Sheila and He-Man are twins; Sheila is the OLDER twin. Assume they were born immediately after each other, an infinitesimally small - but nonzero - amount of time apart. During one year in the course of their lives, Sheila celebrates her birthday two days AFTER He-Man does. How is this possible?
Bonus: What is the maximum amount of time by which Sheila and He-Man can be apart in their birthday celebrations during the same year? I think...
|
by: stilldancin12 |
last post by:
Ok so i have to write an application that asks for the users birthday and replies with they day of the week in which he or she is born on, using the java program. This is what I have so far.It gives me the actual birthday, but not the day of the week. I feel like i am just missing one simple line of text but I can't figure out what it is. Any help would be appriciated!
package Ch2Scanner;
import java.text.SimpleDateFormat;
import...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |