473,499 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

time stamp data type

24 New Member
Hi,

I want to enter only time from frontend & not date time.
Can I do this & can I store this in DB. If yes, what will be data type to store only time values. How do I retrieve the time data in case I want to find difference.
Please reply.

Thanks
Shubhangi
Sep 18 '06 #1
2 3091
aramki
9 New Member
You could use a char field to store your time so it looks like the time only, but I would recommend to use the datetime field to be more accurate and display the data formatted using the convert function, also having the datetime field allows you to use the datediff function to calculate time difference.
Sep 18 '06 #2
ramasp
19 New Member
Hi,
Answer is
--------------
select convert(varchar,getdate(),114)

select convert(varchar,ts,114) from tablename

Here ts is the column name and its datatype is datetime

Regards
Ram ASP
Sep 23 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
4712
by: Yang Li Ke | last post by:
Hi guys, Im about to build a script which will log visitor time spent on my website. I got a few ideas about this, maybe checking visitors ip and storing that info in db with time in and then...
7
19572
by: Don | last post by:
Hi all, With regards to the following, how do I append the datetimestamp to the filenames in the form? The files are processed using the PHP script that follows below. Thanks in advance,...
2
2500
by: vj | last post by:
I am not able to insert data , as i have one of the composite key as type of time stamp , which gets the current timestamp value. When two records are inserted with the same data in the composite...
2
1220
by: lucifer | last post by:
actually i am transmitting data over wireless medium so i have to control the data ie slow it down thats i have to get a delay in the transmitting function inversely to the speed of the the...
6
13575
by: Mike Charney | last post by:
Is there a way to check a files date and time stamp from VBA in access. I have a need check a date stamp on a file that I am importing. Thanks in advance, Mike m charney at dunlap hospital...
3
17533
by: phried1 | last post by:
I have created a form and inserted the following tables: Date Entered Time Entered Date Modified Time Modified Essentially how and where can I have these dates and times recorded so when the...
1
1863
by: Bill | last post by:
We have a corporate database that was upgraded to Oracle 10 and I can no longer link to or query a table that contains a Time Stamp field with Access 2003. I've tried the Microsoft ODBC driver and...
4
6788
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
2
1846
by: Shane | last post by:
I'm writing a program for renaming my picture files, and I want to use the picture time stamp as a prefix to the file names. I can get the time stamp, but it is extraordinarily slow! I have about...
2
3672
by: Anisht79menon | last post by:
I want to convert a DATE with time stamp(stored in a column of a table of data type as DATE ) to a DATE without time stamp. I have a constraint also, I can't use TO_CHAR function. Example. ...
0
7130
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
7007
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
7171
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
7220
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...
1
6893
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
7386
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...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3098
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...
0
1427
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 ...

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.