date in datagridview

Last Reply on Nov 25, 2013 02:31 AM By Mudassar

Posted on Nov 22, 2013 03:58 AM

hii frnds...

I hv a web page having two fields file path and information

m asked to show the above in datagridview( file name, information,date) which i hv done but i hv been also asked to show the date and time of file upload.

m not able to understand how do i retrieve the date and time when there if no field to store it...

 

 

You are viewing reply posted by: rani1988 on Nov 25, 2013 12:18 AM.
Posted on Nov 25, 2013 12:18 AM Modified on on Nov 25, 2013 12:18 AM

hii mudassar

i solved my problem bt i wantd to consult from u wheather what i did is rgt....

i imported the name space

1)Imports system.datetime

2)added a date (null)column with datatype datetime in database

3)   cmd.Parameters.AddWithValue("@ccd_Date",SqlDbType.DateTime).Value = DateTime.Now()

4) added a column date to the datagridview and binded it with the db ccd_date column having null

it does show up the accurate date and time when the file was uploadd in the datagridview 

 

is this way right????? do reply