i have a .txt file in that i want to take the date between 2008-12-16 to 2008-12-31 from snapshot_date column with this condition i want to pick the whole record.
the below is code which it is reading .txt file, i want to know where i have to give the condition.please help me. I am new to c programing.
Code:
#include<stdio.h>
#include "./fcf013h0.h"
int main()
{
FILE *pfile;
char my[200];
pfile=fopen("my1.txt","r");
if(pfile==NULL) perror("error in opening file");
else {
while(fgets(my, 200, pfile))
{
if (!strchr(my, '\n')) puts(my);
else fputs(my, stdout);
}
puts(my);
fclose(pfile);
}
return(0);
}
Thanks & Regards,
Vijay