cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the hour an minutes from a timestamp

Former Member
0 Kudos

Hi,

How can I get de hour and minutes from a Timestamp field

The database is MS SQL SERVER 2008

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Jose,

Do you want to extract hour and minute from a datetime column or timestamp?

If it is datetime, you can create an object with the following definition:

select DATEPART(hour,column name) from table.

Similarly for minute,

select DATEPART(minute, column name) from table.

Thanks,

Madhumitha

Former Member
0 Kudos

I want to do that in the IDT and the filed is TimeStamp,

But I will have to separate the date in the database