Click here to Skip to main content
15,883,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
when user signup then current date will be save in database

store procedure of user signup is

SQL
ALTER procedure [dbo].[spusersignup]
@UserName nvarchar(50),
@Password nvarchar(50),
@Email nvarchar(50),
@PhoneNumber nvarchar(50)
as
Insert into [Users](UserName,Password,UserTypeID,CreateDate,Email,PhoneNumber)
values(@UserName,@Password,2,GETDATE(),@Email,@PhoneNumber)

i call this store procedure in signup button and it works but only in database

when user log in and view his/her profile then

join date will be shown in his/her profile ..how i do this??
Posted
Updated 11-Apr-13 9:26am
v2
Comments
Richard C Bishop 11-Apr-13 15:05pm    
Just do a query for that date after they login and display it in a label somewhere.

1 solution

SQL
SELECT CreateDate FROM Users WHERE UserName = @UserName


Then just store the value into a control, wherever you want.
 
Share this answer
 
Comments
Maciej Los 11-Apr-13 15:27pm    
+5
Shanalal Kasim 12-Apr-13 2:26am    
+5
ariesareej 12-Apr-13 7:19am    
what +5 ?
ariesareej 12-Apr-13 7:21am    
i do this but when i post label and double click on label to call this procedure the label not aviable...
public datatable getdate()
{
db.executedataset("spgetdate",new object[]).tables[0];
}
i create this funtion for get date now i call this in lable control??
ZurdoDev 12-Apr-13 7:29am    
Why is your function for getting a date returning a DataTable? Do you want to return either a string or a DateTime?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900