Results 1 to 2 of 2

Thread: EASY Question!

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    32

    Wink

    Does anyone know how to strip the time from a datetime field declared in a stored procedure?

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617
    select DATEPART(hour,getdate())
    select DATEPART(minute,getdate())

    This is just an example...

    assuming u're using SQL SERVER

    Otherwise

    use

    select substring(convert(varchar(20),getdate()), 13, 20)

    good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width