dato oprettelse
Hey er der en der ud der kan lave en dato string til mig så den vil passe ind i denne kode hvor det står today.using System;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string fnavn = "";
SqlConnection con = new SqlConnection("DSN=dbtest");
con.Open();
SqlCommand sel = new SqlCommand("SELECT * FROM LOG WHERE ename = 'u1vFTx' and date = '" & today & "'", con);
SqlDataReader rdr = sel.ExecuteReader();
while (rdr.Read())
{
fnavn = (string)rdr[0];
// brug data
}
lbl1.Text = fnavn;
rdr.Close();
con.Close();
}
}