WebSecurity.GetCreateDate Method

Returns the date and time when the specified membership account was created.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

public static DateTime GetCreateDate(
	string userName


Type: System.String
The user name for the membership account.

Return Value

Type: System.DateTime
The date and time that the membership account was created, or DateTime.MinValue if the account creation date is not available.


The SimpleMembershipProvider.Initialize(String, NameValueCollection) method was not called.


The InitializeDatabaseConnection() method was not called.


The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.