I have made a registration form using C# and the record will be saved in sql. I want to also add a record of the registration date automatically. How to do this?
AngelicOne
4
Posting Whiz
Recommended Answers
Jump to PostI'm confused, are you wanting to record the date of the registration within the information you're recording about the registration? Or in a separate record/table?
If you simply want the current date/time within the same record it's as simple as adding a date/time column in your table and populating …
Jump to PostYou can open your table in Desing mode,add the column of registration date with datatype of datetime then go to column properties and in "default value or binding" properties add "getDate()" without qout as value. Now save the table, From now on you do not need to do anything, whenever …
Jump to Postwhy to increase code..
if you are using the current date and time
let the sql server help you..
mono_jit23 has given the best deal.. :)
your way okey but the thing is you can control
the TV via Remote..why do you need to go …
Jump to PostOk, Umm... If you have SQL Server Management Tools available for you for the DB you're working on do this:
- choose the Date_Registered column within your table
- Column Properties > General > Default Value or Binding
- Enter "getDate()" (without quotes)
It may give you some grief over …
All 15 Replies
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
AngelicOne
commented:
thanks
+1
mono_jit23
1
Junior Poster in Training
Lusiphur
commented:
That's what I was getting at :)
+1
AngelicOne
4
Posting Whiz
dnanetwork
18
Practically a Master Poster
Banned
AngelicOne
commented:
good example
+1
AngelicOne
4
Posting Whiz
AngelicOne
4
Posting Whiz
AngelicOne
4
Posting Whiz
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
AngelicOne
commented:
nice comeback.. xP
+1
AngelicOne
4
Posting Whiz
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
AngelicOne
4
Posting Whiz
AngelicOne
4
Posting Whiz
AngelicOne
4
Posting Whiz
dnanetwork
18
Practically a Master Poster
Banned
crishjeny
-10
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.