Click here to Skip to main content
15,902,299 members
Home / Discussions / Database
   

Database

 
QuestionIndexing Question Pin
Meysam Mahfouzi26-Sep-08 20:49
Meysam Mahfouzi26-Sep-08 20:49 
AnswerRe: Indexing Question Pin
Wendelius26-Sep-08 22:38
mentorWendelius26-Sep-08 22:38 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi26-Sep-08 23:25
Meysam Mahfouzi26-Sep-08 23:25 
GeneralRe: Indexing Question Pin
Wendelius26-Sep-08 23:51
mentorWendelius26-Sep-08 23:51 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi27-Sep-08 0:03
Meysam Mahfouzi27-Sep-08 0:03 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi27-Sep-08 2:35
Meysam Mahfouzi27-Sep-08 2:35 
GeneralRe: Indexing Question Pin
Wendelius27-Sep-08 3:06
mentorWendelius27-Sep-08 3:06 
QuestionConvert datetime to just time (only hour) Pin
notes4we26-Sep-08 10:03
notes4we26-Sep-08 10:03 
Hello,

I have one datetime column named Hours in SQL Server Table1, which gives the output as 09/26/2008 01:00:00, 09/26/2008 02:00:00, 09/26/2008 03:00:00 till 09/26/2008 12:00:00 format.

I wanted to get just the year in int datatype from this format and I got it using (SELECT CONVERT(int, YEAR (Hours)) AS Year FROM Table1) and I am getting the correct Year as I wanted 2008. Same way I am getting month and date also. But the issue is with hour.

I want the hour also in the integer format. I mean if there is 01:00:00, then the output should just be 1 and same way the next should be 2.

Can anyone please help me to achieve this output?
I want a proper syntax for the same.
Meanwhile I will carry on the research on my part.

Thank you.
AnswerRe: Convert datetime to just time (only hour) Pin
PIEBALDconsult26-Sep-08 10:38
mvePIEBALDconsult26-Sep-08 10:38 
AnswerRe: Convert datetime to just time (only hour) Pin
Blue_Boy26-Sep-08 23:47
Blue_Boy26-Sep-08 23:47 
QuestionSQL SP Pin
Care Career26-Sep-08 9:02
Care Career26-Sep-08 9:02 
AnswerRe: SQL SP Pin
Wendelius26-Sep-08 9:30
mentorWendelius26-Sep-08 9:30 
GeneralRe: SQL SP Pin
Care Career28-Sep-08 6:55
Care Career28-Sep-08 6:55 
GeneralRe: SQL SP Pin
Wendelius29-Sep-08 3:41
mentorWendelius29-Sep-08 3:41 
GeneralRe: SQL SP Pin
Care Career28-Sep-08 6:59
Care Career28-Sep-08 6:59 
AnswerRe: SQL SP Pin
nelsonpaixao28-Sep-08 13:33
nelsonpaixao28-Sep-08 13:33 
QuestionUniqueIdentifier Pin
Mohammad Al Hoss26-Sep-08 4:44
Mohammad Al Hoss26-Sep-08 4:44 
AnswerRe: UniqueIdentifier Pin
J4amieC26-Sep-08 4:46
J4amieC26-Sep-08 4:46 
Questionbackup from a specific table Pin
reza assar26-Sep-08 2:59
reza assar26-Sep-08 2:59 
AnswerRe: backup from a specific table Pin
Tim Carmichael26-Sep-08 5:49
Tim Carmichael26-Sep-08 5:49 
AnswerRe: backup from a specific table Pin
Wendelius26-Sep-08 6:45
mentorWendelius26-Sep-08 6:45 
Questionconnect with application using ado Pin
reza assar26-Sep-08 2:55
reza assar26-Sep-08 2:55 
AnswerRe: connect with application using ado Pin
Ashfield26-Sep-08 3:21
Ashfield26-Sep-08 3:21 
QuestionAbout + operator for string Pin
TALHAKOSEN26-Sep-08 1:31
TALHAKOSEN26-Sep-08 1:31 
AnswerRe: About + operator for string Pin
Ashfield26-Sep-08 1:49
Ashfield26-Sep-08 1:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.