User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,770 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,268 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 1913 | Replies: 2
Reply
Join Date: Feb 2008
Posts: 31
Reputation: nikk is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
nikk nikk is offline Offline
Light Poster

Question how to get current date and then store it to database?

  #1  
Feb 17th, 2008
Hi friends,
I'm creating a website for my college project.
on clicking submit button on the feedback form, i want to retrieve current date and then store it along with entered details in the MS SQL database.
I don't know how to do it.

Can you please help me?

I'm doing the project using JSP and html pages and am using netbeans and tomcat.

Please help...!!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation: jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough 
Rep Power: 30
Solved Threads: 264
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Microsoft Fanboy

Re: how to get current date and then store it to database?

  #2  
Feb 17th, 2008
You could probably set the default field value for new records to Now() from within MS SQL

i know this works for ms access/asp.net
TRY MY SUGGESTIONS AT YOUR OWN RISK!
james.bennet1@ntlworld.com
Reply With Quote  
Join Date: Aug 2006
Location: Egypt
Posts: 759
Reputation: RamyMahrous is on a distinguished road 
Rep Power: 4
Solved Threads: 57
Featured Poster
RamyMahrous's Avatar
RamyMahrous RamyMahrous is offline Offline
Master Poster

Re: how to get current date and then store it to database?

  #3  
Feb 18th, 2008
In column properties set default value = getdate()
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 4:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC