Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2007

Tip: Looking for answers? Try searching our database.

Date time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bbawa1@yahoo.com - 24 May 2007 22:45 GMT
Hi,

I have a table in sql server of datatype datetime.  I want to set it's
default value to Current date in design mode.  I am typing in default
value property = Date.now().  But it doesn't work.  Any idea.

Thanks
Alexey Smirnov - 24 May 2007 23:07 GMT
On May 24, 11:45 pm, bba...@yahoo.com wrote:
> Hi,
>
[quoted text clipped - 3 lines]
>
> Thanks

Where do you type it?

SQL Server has built-in function getdate(), which is the same as
DateTime.Now from .NET
bbawa1@yahoo.com - 24 May 2007 23:11 GMT
> On May 24, 11:45 pm, bba...@yahoo.com wrote:
>
[quoted text clipped - 10 lines]
> SQL Server has built-in function getdate(), which is the same as
> DateTime.Now from .NET

I am typing this in Design mode of table.  I highlight the column and
then there is column proerties.  "Default value or Binding".  I am
typing this over here.
Alexey Smirnov - 24 May 2007 23:22 GMT
On May 25, 12:11 am, bba...@yahoo.com wrote:

> > On May 24, 11:45 pm, bba...@yahoo.com wrote:
>
[quoted text clipped - 14 lines]
> then there is column proerties.  "Default value or Binding".  I am
> typing this over here.

Use getdate()

http://msdn2.microsoft.com/en-us/library/ms188383.aspx
bbawa1@yahoo.com - 24 May 2007 23:33 GMT
> On May 25, 12:11 am, bba...@yahoo.com wrote:
>
[quoted text clipped - 22 lines]
>
> - Show quoted text -

Thanks a lot .  It solved my problem.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.