Questions tagged [coledatetime]
25 questions
1
vote
0 answers
ColeDateTime::Format languagespecific different fields
I want to format a COleDateTime as a CString, so i use
COleDateTime dt = GetMyDateTimeObj();
dt.Format(LOCALE_NOUSEROVERRIDE, GetCurrentLocaleID());
Since my program is multilanguage, GetCurrentLocaleID gives me the LCID currently selected (not in…

suriel
- 191
- 1
- 10
1
vote
1 answer
Java vs c++ types
I've recently had a question about coledatetime java implementation, and Chris said, that the problem might lay in type conversions: cpp-float vs java-float (Or maybe cpp-date vs java-date. Not types, but..). Now I have several questions on…

George
- 8,368
- 12
- 65
- 106
1
vote
1 answer
incorrect value in coledatetime
I'm fighting a few days with COleDateTime in MFC.
I have CTime with correct values. Correct years, days, months, hours, minutes and seconds.
I tried a few ways to convert CTime to COleDateTime:
-1.I put CTime data to constructor of COleDateTime…

user1711993
- 271
- 4
- 20
1
vote
1 answer
Is it faster to get year and month directly from COleDateTime or converting to SYSTEMTIME first?
I want to get the year and month from a COleDateTime object and I want it to be as fast as possible. I have 2 options;
COleDateTime my_date_time;
int year = my_date_time.GetYear();
int month = my_date_time.GetMonth();
or
COleDateTime…

Steztric
- 2,832
- 2
- 24
- 43
0
votes
1 answer
Date format for setting start and end date to Outlook appointment in java code
I am creating an appointment in Outlook through java code. here I can set new values to the fields in appointment. The code for it is
OleAutomation appointment = invoke(outlook, "CreateItem",…

Anu
- 1,884
- 14
- 30
0
votes
1 answer
Issue with detecting week number with COleDateTime::Format
I have two dates:
Monday 26/12/2022
Sunday 01/01/2023
Take this code:
CString strDate = L"2022-12-26 00:00:00";
COleDateTime datMeeting;
datMeeting.ParseDateTime(strDate);
const auto iPublicTalkWeekNumber = _ttoi(datMeeting.Format(L"%W"));
The…

Andrew Truckle
- 17,769
- 16
- 66
- 164
0
votes
1 answer
COleDateTimeSpan dates difference returns incorrect value sometimes
I am using the following code to find the difference between two dates basically one is current system date and another server date. I am getting different values at different times, hence I changed the format to only include dates and not…

SCodesR
- 5
- 3
0
votes
0 answers
COleDateTimeSpan::GetTotalSeconds() returning seconds + 10281600
I am successfuly creating to COleDateTimes, and then minusing them to create a COleDateTimeSpan. For some reason calling the GetTotalSeconds() method has suddenly started returning a huge number, which appears to be the number of seconds PLUS…

Raiden616
- 1,545
- 3
- 18
- 42
0
votes
3 answers
How to convert COledatetime to unix time / php time?
How can I convert a COleDateTime::GetCurrentTime() to a unix time stamp or more specifically I want to convert the value so I can use it in PHP with the date() function?

Scott Szretter
- 3,938
- 11
- 57
- 76
-2
votes
1 answer
System::DateTime returns value of 1/1/1 00:00:00
COleDateTime m_dt;
m_ctrlDateTime.GetTime(m_dt);
double d = dt.m_dt;
System::DateTime datum;
datum.FromOADate(d);
I am trying to get date and time from a DateTimePicker control and to later on set the value of datum to that value. Datum is…

tamtam
- 13
- 5