I needed to get the date from my SQL server. Found this worked fine.
public DateTime GetDate()
{
var session = GetCleanSession();
var query = session.CreateSQLQuery("SELECT Getdate();");
DateTime results = (DateTime)query.UniqueResult();
return results;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment