Date time so confuse.
-
Hi All. Firstly.I use Database link from my SQL to Oracle to get Data.In The Oracle the field sta_datetime is date type. Now I use convert(varchar(10),sta_datetime,111) as Sdate, convert(time,sta_datetime) as S_Time, To get data to Sdate field date type and S_Time field is time(0)type. Now I show them in the gridview and then get them back when user lick on the row to show on another child gridview. So many convert time.So it is so difficult to get them back.
-
Hi All. Firstly.I use Database link from my SQL to Oracle to get Data.In The Oracle the field sta_datetime is date type. Now I use convert(varchar(10),sta_datetime,111) as Sdate, convert(time,sta_datetime) as S_Time, To get data to Sdate field date type and S_Time field is time(0)type. Now I show them in the gridview and then get them back when user lick on the row to show on another child gridview. So many convert time.So it is so difficult to get them back.
Your question is also confusing. So much so that I'm not sure what your question is! However, Don't convert date, datetime or time to varchar(anything) ... use the appropriate types. It is only in the final presentation of the data that you need to worry about how it looks
-
Your question is also confusing. So much so that I'm not sure what your question is! However, Don't convert date, datetime or time to varchar(anything) ... use the appropriate types. It is only in the final presentation of the data that you need to worry about how it looks