473,569 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time part Problem

2 New Member
Dear All,
I have little query for the time part. I written following script want to fetch time.

declare @pack1_in_time datetime

select @pack1_in_time = CONVERT(CHAR(5) ,convert(dateti me, '05:32:08 PM',126),114)
select @pack1_in_time

Result:--> 1900-01-01 17:32:00.000

Using of 114 parameter in convert function, 1900-01-01 is also coming. I want only time portion i.e. 17:32.

How it can possible ?? Please give me solution.
Thanks in advance.
Apr 26 '07 #1
0 1027

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

Similar topics

2
6082
by: Marcus | last post by:
I am having some problems with trying to perform calculations on time fields. Say I have a start time and an end time, 1:00:00 and 2:30:00 (on a 24 hour scale, not 12). I want to find the difference in minutes, divide this result by a predefined size of interval, and make a loop that runs this many times. For example, with an interval size...
12
6529
by: Russ | last post by:
I'm interested in setting up a web page where live data can be displayed in real-time on the web page. For example: I would like to display a (nice looking) graph of some data value versus time and have the graph update every second without the user having to do anything like hit a refresh button. The data to plot is readily available from...
2
4629
by: CSN | last post by:
Is it possible to update the timezone part of timestamp fields in a single query? I have a bunch of values that are -06 I need changed to -07. BTW, better to use 'timestamp without time zone' or 'timestamp with time zone'? __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now
1
2514
by: gi75research | last post by:
What should be a very simple function is going terribly wrong, and I don't know why. StartTime and EndTime are table values (formatted like "01:00A" or "02:00P"); DaypartStart and DaypartEnd are string values I specify when calling the function (initially tried passing time values & the same problem occurs); In the If statement, I can compare...
5
2449
by: sandman | last post by:
I've been testing my web app on another workstation to simulate using the server time. The test pc's time is an hour behind the server time and when the user processes a request, the server time is picked up. The problem is that I've got a "clock" on the web page that updates the "current time" every second since the app is time critical. ...
80
3417
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the process starts is not especially important, but it must be complete within a small number of seconds. The operations I am performing do not take a...
5
3093
by: Sinan Nalkaya | last post by:
hello, i need a function like that, wait 5 seconds: (during wait) do the function but function waits for keyboard input so if you dont enter any it waits forever. i tried time.sleep() but when i used time.sleep in while, the function in while never executed. then i found something about Timer but couldnt realize any algorithm in my mind.
14
3460
by: Gotisch | last post by:
Hi, we are currently writing an mostly singlethreaded (game)server application in c#. But we are encountering problems with the Garbage Collector: After a certain time but also apparently randomly the GC starts working Alot and taking up to 60-70% of the cpu time, which results in huge lags in responce time of the server. The server uses...
3
2736
by: Satish Itty | last post by:
Hi all, I have a big problem in my hands and not sure how I can fix this. Any suggestions would be greatly appreciated. I have a .NET 3 tier app developed in VS2003 and .NET 1.1. the client is a windows application and middle tier runs on IIS. Data is passed between the client and middle tier as DataSets and custom value object classes. The...
2
1658
by: chrisf01 | last post by:
I am trying to write to a text file and the database at the same time. I have a For statement that loops through all the repeated fields in my form and writes it to a text file. That part works 100% without a problem. My problem is that I also want to write to the SQL database at the same time and anytime I put the sql stored procedure inside...
0
7703
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, 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...
0
7618
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...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
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...
0
3657
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...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
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
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.