Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

New Post: Search Since

$
0
0
Hi Miroslav,

this question already has been discussed here before, however the answer didn't contain the hints on how to format the date with standard .Net methods.

The dates being passed with IMAP SEARCH queries are always formatted as 1-Feb-1994 (dd-MMM-yyyy). To convert a DateTime object to string with the specified format, do the following:
client.Folders.Inbox.Search("SINCE " + dateTime.ToString("dd-MMM-yyyy", new CultureInfo("en-US")))
This works for all date specfic queries (e.g BEFORE etc.).

Greets,

Pavel

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>