In my database, I have a column that has a 'date' datatype.
That means It will only take dates in YYYY-MM-DD format.
My question is,
how do I send the current date from C# to the database?
Like, if I use CURDATE() in the query on PHPMyAdmin, it'd give me today's date in the format I want. But how can I somehow use that "CURDATE()" in C# Windows Form when I send information to the database?
string query = "INSERT INTO player (date, name, level, experience) " +
"VALUES ('" + DateTime.Today + "','" +
getPlayerName(Tibia.Handle, (BattleList_Start + Base + (BattleList_Step * playerIndex) + 4)) + "'," +
ReadInt32(LvlAdr + Base, 4, Tibia.Handle) + "," +
ReadInt32(XpAdr + Base, 4, Tibia.Handle) + ")";