I would like to get the date input from the user but i have tried to do the dialog to accept from the user the date but have failed i get the USER 3 failure but i have made sure that the date is correct he is my rss code and cpp code

rss code
Code:

RESOURCE DIALOG r_date_query
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
type = EEikCtDateEditor;
id = EGeneralQuery;
control = AVKON_DATA_QUERY
{
layout = EDateLayout;
label = "Enter Date:";
control = DATE_EDITOR
{
flags = 0;
};
};
}
};
}



cpp code
Code:

hometime.HomeTime();
CAknTimeQueryDialog* dlg = CAknTimeQueryDialog::NewL( hometime, CAknQueryDialog::ENoTone );
dlg->PrepareLC(R_DATE_QUERY);
dlg->RunLD();