I Have a list (Orders list) where i have a column "CreationDate" as internal name.
That column stores datetime of the order.
When I show this column in a View, it appears in the format "dd/mm/yyyy" and that is good for me.
The problem comes when I need to do it:
myItens = (from SPListItem item in list.Items
where (Convert.ToDateTime(item["DateCreation"]).ToShortDateString() == Convert.ToDateTime("12/14/2012").ToShortDateString() ) && // Convert.ToDateTime("14/12/2012").ToShortDateString()) &&
(item["Statut"].ToString() == "En cours de traitement") &&
(item["TypeLigne"].ToString() == tLigne)
select item).ToList();
... for the Convert.ToDateTime("12/14/2012").ToShortDateString() it answer me for this format: "12/14/2012"... if i use the correct (14/12/2012) format it doesnt work!!
I receive a error message like the date is not in correct format.
Someone can help?
Thnk you.