sql - convert time portion of date to an int -



sql - convert time portion of date to an int -

i have column called enteredindate includes info such as:

2012-10-10 18:02:00 2012-10-11 13:30:00 2012-10-11 14:27:00 2012-10-12 14:14:00

how create new column has int info value next enteredindatecolumn this?

1802 1330 1427 1414

use datepart:

select datepart(hour, enteredindate) * 100 + datepart(minute, enteredindate)

sql sql-server

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -