Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

When creating a table, you have the option of assigning a default value for a column. Is it possible to set the default value for a datatime column to the current date and time?

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

Sorry, should have provided more information: Database is SQL server 2000. Am trying to set the default value in the table design page of enterprise manager.

 

Yea GetDate() works, thanks.

 

Mike55

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

Is there a list of all the functions that I can put into the default value field available?

 

Mike55

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted
Just had a quick look through Sql Server BOL and cant seem to find anything listing functions that can be used in the default value column. And, i have only ever set INT, VARCHAR and DATETIME defaults - of which DATETIME was the only one that required a function call to set the current date and time!

Visit: VBSourceSeek - The VB.NET sourcecode library

 

 

"A mere friend will agree with you, but a real friend will argue."
Posted

Yea, thats were I started searching originally, but came up with nothing of value, if I come across anything interesting, I'll let you know.

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...