By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

SQL eqivalent to VB FIX or INT?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.