Print Page | Close Window

Date one field or 3 fields?

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4513
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Date one field or 3 fields?
Posted By: ngaisteve1
Subject: Date one field or 3 fields?
Date Posted: 25 July 2003 at 1:14am
Currently, my database got 3 fields to hold the date. The day, month and year. The reasons I did that because I think it's easier for me in the future to query my records. If I use date datatype, I need to split them. But, then when there is date datatype. My friend who is a senior in the area advice me to use just one field to hold the date. I need more advices from you guys. Thanks.



Replies:
Posted By: stephen
Date Posted: 25 July 2003 at 2:35am

Personally I think it's better to use one field for it. It's easier to make date/time calculations when it's in just one field. It depends on how scaleable and flexible your application needs to be.

The way you store it at present, if you intend to do any calculations, it means you have to retrieve three records, string them together etc.



-------------
"Doing easily what others find difficult is talent; Doing what is impossilbe for talent is genius." -- Henri Frederic Amiel ( 1828-1881)
http://www.121People.com - www.121People.com


Posted By: ngaisteve1
Date Posted: 25 July 2003 at 3:23am
Thanks.


Posted By: ljamal
Date Posted: 25 July 2003 at 8:06am
one field and use the datepart function when you need the separate parts.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net