Hi
Here is the time in SQL : 2/21/2003 12:00:00 PM (DataType :datetime)
How can i convert this into CTime .the MFC class
Help inthis regard is appreciated,
Thanks in AdvanceA datetime is not that format. It is a decimal number - that is just the way it is converted for display.
What format do you need it in to put into a CTime.|||Thanks 'nigelrivett' for replying me
Yes...I reading the date(datetime) from the Data Base as the String..I want Month,Year,Date,Hour and Minute to build the Time for my application.
i like to build the CTime as below:
CTime Ts(nYear,nMonth,nDate,nHour,nMinute,nSecond,o);
So please tell me how get the Hour,minute,Day,Year from the Data Base.
Thanks in advance,
Sirish|||try:
select getdate() as 'Original Date'
, datepart(yy,getdate()) as 'Year'
, datepart(mm,getdate()) as 'Month'
, datepart(dd,getdate()) as 'Day'
, datepart(hh,getdate()) as 'Hour'
, datepart(mi,getdate()) as 'Minute'
, datepart(ss,getdate()) as 'Second'
, datepart(ms,getdate()) as 'Millisecond'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment