473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

what to use

Hi,
I am working on an online timesheet system. Where users will enter hours
they worked from and how long they worked on a oparticular project.

Which datatype would be the best one to use for handling this type of
information? Is it DateTime or is there something better?

Thanks Chris
Nov 17 '05 #1
3 974
Based on what you've stated, you'll probably want
to use a float, numeric, or decimal data type. Read
up on the precision in SQL Server help (assuming
that is your database).

Definitely don't use an integer and datetime probably
isn't a good fit if your people aren't clocking in and out
on a project.

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp

"chris" <ch***@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com...
Hi,
I am working on an online timesheet system. Where users will enter hours
they worked from and how long they worked on a oparticular project.

Which datatype would be the best one to use for handling this type of
information? Is it DateTime or is there something better?

Thanks Chris

Nov 17 '05 #2
Thanks Robbe. I forgot to mention that the data they are entering hast to be
in this format:

08:30 or 17:30

Thanks again

Chris

"Robbe Morris [C# MVP]" wrote:
Based on what you've stated, you'll probably want
to use a float, numeric, or decimal data type. Read
up on the precision in SQL Server help (assuming
that is your database).

Definitely don't use an integer and datetime probably
isn't a good fit if your people aren't clocking in and out
on a project.

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp

"chris" <ch***@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com...
Hi,
I am working on an online timesheet system. Where users will enter hours
they worked from and how long they worked on a oparticular project.

Which datatype would be the best one to use for handling this type of
information? Is it DateTime or is there something better?

Thanks Chris


Nov 17 '05 #3

In that case use a DateTime.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"chris" <ch***@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Thanks Robbe. I forgot to mention that the data they are entering hast to
be
in this format:

08:30 or 17:30

Thanks again

Chris

"Robbe Morris [C# MVP]" wrote:
Based on what you've stated, you'll probably want
to use a float, numeric, or decimal data type. Read
up on the precision in SQL Server help (assuming
that is your database).

Definitely don't use an integer and datetime probably
isn't a good fit if your people aren't clocking in and out
on a project.

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp

"chris" <ch***@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com...
> Hi,
> I am working on an online timesheet system. Where users will enter
> hours
> they worked from and how long they worked on a oparticular project.
>
> Which datatype would be the best one to use for handling this type of
> information? Is it DateTime or is there something better?
>
> Thanks Chris


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.