I have written this program, and it uses fgets to get data from the user keyboard. For some reason, my last question, which asks for them to enter the date and time, does not execute the fscanf and assignment. It just does the printf, then goes on ... it's like it's ignoring the { } under the if's ....

I need a second pair of eyes here! It must be something really stupid, and I just can't see it myself!

Here's the code: Thanks!!
**************************************************


/* Create a file */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/* Function Prototypes */

/* Declaratives */

char input_file_name[20];
char input_filename[24];

char output_file_name[20];
char output_filename[24];

char report_file_name[20];
char report_filename[24];

char date_answer[4];
char in_datetime[13];

int main()
{
FILE *inputPtr;
FILE *outputPtr;
FILE *reportPtr;

printf("Enter input file name & hit enter (example: input.txt) ... > ");
fgets(input_file_name, sizeof(input_file_name), stdin);
input_file_name[strlen(input_file_name) - 1] = '\0';

strcpy(input_filename, "a:");
strcat(input_filename, "\\");
strcat(input_filename, input_file_name);

printf("Enter output file name & hit enter (example: output.txt) ... > ");
fgets(output_file_name, sizeof(output_file_name), stdin);
output_file_name[strlen(output_file_name) - 1] = '\0';

strcpy(output_filename, "a:");
strcat(output_filename, "\\");
strcat(output_filename, output_file_name);

printf("Enter report file name & hit enter (example: report.txt) ... > ");
fgets(report_file_name, sizeof(report_file_name), stdin);
report_file_name[strlen(report_file_name) - 1] = '\0';

strcpy(report_filename, "a:");
strcat(report_filename, "\\");
strcat(report_filename, report_file_name);

printf("\nWould you like to override today's date for processing? (yes or no) ... > ");
fgets(date_answer, sizeof(date_answer), stdin);
date_answer[strlen(date_answer) - 1] = '\0';

if (date_answer[0] == 'y')
{
printf("\nEnter processing date & hit enter (e.g. CCYYMMDDHHMM) ... > ");
fgets(in_datetime, sizeof(in_datetime), stdin);
in_datetime[strlen(in_datetime) - 1] = '\0';
}
else
if (date_answer[0] == 'Y')
{
printf("\nEnter processing date & hit enter (e.g. CCYYMMDDHHMM) ... > ");
fgets(in_datetime, sizeof(in_datetime), stdin);
in_datetime[strlen(in_datetime) - 1] = '\0';
}

printf("\n**************************************** ****************************************");
printf("\nThank you .... The program is creating your file .... Please wait.\n");
printf("\n**************************************** ****************************************");

rest of program follows .........

The problem is that instead of letting the user enter the date and time, it just displays the prompt for that .... then just immediately displays the "Thank you .... The program is creating" message.

Any help is greatly appreciated!!!
muffin