473,396 Members | 2,017 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.

SQL eqivalent to VB FIX or INT?

Hi,

Is there anyway with SQL to return just the portion to the left (or
right) of the decimal place like FIX or INT in VB?

Specifically, I am trying to return just the hh:mm of a datetime
field.

Thanks,

Peter

Jul 20 '05 #1
1 4000
These are quite a few different questions.

For extracting the hh:mm out of a datetime, you could use
CONVERT(char(5),MyDateColumn,108).

You can get the portion left of a decimal point with
CAST(MyDecimalColumn AS int) or FLOOR(MyDecimalColumn).

Gert-Jan
Peter Kaufman wrote:

Hi,

Is there anyway with SQL to return just the portion to the left (or
right) of the decimal place like FIX or INT in VB?

Specifically, I am trying to return just the hh:mm of a datetime
field.

Thanks,

Peter

Jul 20 '05 #2

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

Similar topics

7
by: David Callan | last post by:
Hi folks, I'm starting to develop my final year project for college. Just set up dreamweaver site environment. My local machine is windows based running php 5 while my remote machine is unix based...
8
by: Derek Fountain | last post by:
Does Python have something similar to Tcl style tracing? That is, the ability to call a subroutine when a variable is written to or read from?
4
by: Jacek Generowicz | last post by:
How would one write object._new__(SomeType) in the C API ? .... and what lies behind the following behaviour: >>> object.__new__(T) Traceback (most recent call last): File "<stdin>", line 1,...
2
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to...
5
by: Raterus | last post by:
I think I've seen this before as a built-in function. I need a function that I pass it a character and a number and it returns that character repeated that many times. Easy enough to do myself, I...
12
by: K. Wilder | last post by:
In my ASP.Net application I'm trying to contact a host that does not have a web service, i.e.: a file with the asmx extension such as, anything.asmx. They do have an URL to be contacted by VB 6.0...
9
by: NagarajanS | last post by:
Hi, can any one tell me the eqivalent for Application.DoEvents() in java.I am swing application so i need to do this to elimate the hangling of my application. Regards, nags.
1
by: shama1234 | last post by:
I have attached a VB6 source code pls let me know its VB.Net equvalent of this source code. I have upgraded it through Vbuc tool but after upgrading I have got EWIs. So I am also attaching that...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...

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.