There is no need to handle the date and time in your code at all, leave it to the sql server,
1. There is no need to have separate date and time fields in the database table, just one datetime field will do.
2. Set the default value of this datetime field to the current date using getdate(). With that, whenever you insert a row (new student registration) into the table, the current date and time are automatically inserted into this field.
Read more:
getdate[
^]