Sort by MailDates
-
Hi all. See i am reading certain mails i want to sort them by mailDate in Decresing order...and write into xml.. Now i am reading the mail as it is and writing into xml file... how i can compare it and write so it will be in ascending order..
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++) { _tprintf("\nMails found between %s date and %s date\n",linfo->sStDate,linfo->sEndDate); mailDatee = linfo->ACL_STMAIL[y].cMBUserMailDate; mailDatee.Remove('/'); if(linfo->ACL_STMAIL[y].bMBUserMailHasAttachment) { //FileExt = strtok_s(string,"* ,",context); AttachCount=linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount; for(int i = 0;i < (linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount); i++) { elementName [0] = "NAME"; elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName; elementName [1] = "EMAIl"; elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail; elementName [2] = "DATE"; elementValue[2] = mailDatee; elementName [3] = "TITLE"; elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject; elementName [4] = "BODY"; elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc; Hi.. I am Manju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
-
Hi all. See i am reading certain mails i want to sort them by mailDate in Decresing order...and write into xml.. Now i am reading the mail as it is and writing into xml file... how i can compare it and write so it will be in ascending order..
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++) { _tprintf("\nMails found between %s date and %s date\n",linfo->sStDate,linfo->sEndDate); mailDatee = linfo->ACL_STMAIL[y].cMBUserMailDate; mailDatee.Remove('/'); if(linfo->ACL_STMAIL[y].bMBUserMailHasAttachment) { //FileExt = strtok_s(string,"* ,",context); AttachCount=linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount; for(int i = 0;i < (linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount); i++) { elementName [0] = "NAME"; elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName; elementName [1] = "EMAIl"; elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail; elementName [2] = "DATE"; elementValue[2] = mailDatee; elementName [3] = "TITLE"; elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject; elementName [4] = "BODY"; elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc; Hi.. I am Manju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
:)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
:)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
:)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I think it was urgent. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
I think it was urgent. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Hi all. See i am reading certain mails i want to sort them by mailDate in Decresing order...and write into xml.. Now i am reading the mail as it is and writing into xml file... how i can compare it and write so it will be in ascending order..
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++) { _tprintf("\nMails found between %s date and %s date\n",linfo->sStDate,linfo->sEndDate); mailDatee = linfo->ACL_STMAIL[y].cMBUserMailDate; mailDatee.Remove('/'); if(linfo->ACL_STMAIL[y].bMBUserMailHasAttachment) { //FileExt = strtok_s(string,"* ,",context); AttachCount=linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount; for(int i = 0;i < (linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount); i++) { elementName [0] = "NAME"; elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName; elementName [1] = "EMAIl"; elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail; elementName [2] = "DATE"; elementValue[2] = mailDatee; elementName [3] = "TITLE"; elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject; elementName [4] = "BODY"; elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc; Hi.. I am Manju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
I dont know my monitor has problem or your post needs to modify?
-
Rajesh R Subramanian wrote:
I think it was urgent.
NOt urgent..I didnt new ..I was suppose to correct some code...but by mistakeit Reposted
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
It ok Manju!
buntyrolln
-
I dont know my monitor has problem or your post needs to modify?
-
Rajesh R Subramanian wrote:
I think it was urgent.
NOt urgent..I didnt new ..I was suppose to correct some code...but by mistakeit Reposted
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
I was just joking. You could delete your previous - duplicate thread safely as there are no replies yet. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Sorry my post needs to moodify....
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
Well I think its best time to modify it now! :-D
-
I think it was urgent. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Urgent is the standard priority, of course. :-D !(BTW) No Darjeeling at local store. Event tomato flavored tea (well, not really) but no Darjeeling. Next Step: next store. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Urgent is the standard priority, of course. :-D !(BTW) No Darjeeling at local store. Event tomato flavored tea (well, not really) but no Darjeeling. Next Step: next store. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]May be I could ship you a bag of Darjeeling tea? But only if you say URGENZT PZLEEZ. ;)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
May be I could ship you a bag of Darjeeling tea? But only if you say URGENZT PZLEEZ. ;)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
But only if you say URGENZT PZLEEZ.
Well, you know, itz the default: PLZ PLZ SIR URGENT PLZ PLZ PLZZZZZ :-D :laugh: :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Well I think its best time to modify it now! :-D
Hamid. wrote:
Well I think its best time to modify it now!
Hi.. See i am reading certain mails i want to sort them by mailDate in Decresing order...and write into xml.. Now i am reading the mail as it is and writing into xml file... how i can compare it and write so it will be in ascending order.. My code is.. ///////////////////
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++)
{
mailDatee = linfo->ACL_STMAIL[y].cMBUserMailDate;
mailDatee.Remove('/');
{elementName [0] = "NAME";
elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName;
elementName [1] = "EMAIl";
elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail;
elementName [2] = "DATE";
elementValue[2] = mailDatee;
elementName [3] = "TITLE";
elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject;
elementName [4] = "BODY";
elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc;
}Here mailDatee are the maildate i get from mails one by one thank you
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
-
Hamid. wrote:
Well I think its best time to modify it now!
Hi.. See i am reading certain mails i want to sort them by mailDate in Decresing order...and write into xml.. Now i am reading the mail as it is and writing into xml file... how i can compare it and write so it will be in ascending order.. My code is.. ///////////////////
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++)
{
mailDatee = linfo->ACL_STMAIL[y].cMBUserMailDate;
mailDatee.Remove('/');
{elementName [0] = "NAME";
elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName;
elementName [1] = "EMAIl";
elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail;
elementName [2] = "DATE";
elementValue[2] = mailDatee;
elementName [3] = "TITLE";
elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject;
elementName [4] = "BODY";
elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc;
}Here mailDatee are the maildate i get from mails one by one thank you
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
What type of a variable is mailDatee?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
What type of a variable is mailDatee?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Rajesh R Subramanian wrote:
What type of a variable is mailDatee?
CString mailDatee;
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
Why is a date being stored as a string? :confused: OK - what is
linfo
?Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Why is a date being stored as a string? :confused: OK - what is
linfo
?Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
OK - what is linfo?
linfo->ACL_STMAIL[0].iMBUserMailCount is nothing but It gets the mail Count..How many mails are there linfo is a nested structure
Rajesh R Subramanian wrote:
Why is a date being stored as a string?
Because first i was getting date in yyyy/mm/dd.. So to remove "/" I converted it to CString..
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
-
Rajesh R Subramanian wrote:
OK - what is linfo?
linfo->ACL_STMAIL[0].iMBUserMailCount is nothing but It gets the mail Count..How many mails are there linfo is a nested structure
Rajesh R Subramanian wrote:
Why is a date being stored as a string?
Because first i was getting date in yyyy/mm/dd.. So to remove "/" I converted it to CString..
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju
manju#123 wrote:
linfo is a nested structure
Can you show me how the structure looks like?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
manju#123 wrote:
linfo is a nested structure
Can you show me how the structure looks like?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
Can you show me how the structure looks like?
//////////////////
struct loginInfo { CAclsApi *TestApi ; _TCHAR *sUserName; _TCHAR *sPassWord; _TCHAR *sServerName; _TCHAR *sTagStyle; long sMaxCrawl; const _TCHAR *sStDate; const _TCHAR *sEndDate; _TCHAR *sFileExt; _TCHAR *OutPut; _TCHAR *sMailDate; _TCHAR *sDuration; bool *cMailHasAttachment; _TCHAR *cAttachFileNames; bool bThreadRunning; bool bServerConnected; bool BServerConnected() const { return bServerConnected; } void BServerConnected(bool val) { bServerConnected = val; } bool btimeOut; _TCHAR thstrAclInfo[1024]; ACL_STATUS status; ACL_STRUCT_INFO *ACL_INFO; ACL_STRUCT_MBUSERS_MAIL *ACL_STMAIL; ACL_STRUCT_MBUSERS *ACL_MBUSERS; ACL_STRUCT_MBUSERS_MAIL_ATTCH *ACL_MAIL_ATTACH; };
unsigned int __stdcall ConnectToServer(void *dummy) { loginInfo *linfo = (loginInfo*)dummy; linfo->ACL_INFO=new ACL_STRUCT_INFO; linfo->ACL_STMAIL=new ACL_STRUCT_MBUSERS_MAIL[MAX_MAIL_COUNT]; linfo->ACL_MBUSERS=new ACL_STRUCT_MBUSERS[MAX_MAILBOX_COUNT];
Hi.. I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++ manju