Question:

Coldfusion how to put todays date and time in microsoft sql?

by  |  earlier

0 LIKES UnLike

Hey Everyone,

I was just wondering if anyone knew how to put the current date and time

into a sql database? i tried using getDate() an put it as a default value for my date field but it still displays 1/1/1900 12:00:00 AM. Any suggestions?

Thank you in advance,

Rach

 Tags:

   Report

1 ANSWERS


  1. Try this

    create table #T(id int, dt datetime default getdate())

    go

    insert into #T(id) values(1)

    go

    select * from #T

    What do you see?

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.