Get Outlook Mail Filtering by Date and Time Variable

.

Hi all,
I trying to filter my outlook email by date and time.
I’m using following code in Get Outlook Mail Messages activity.

StartHHmm=“00:00AM”
EndHHmm=“10:00AM”
“[Received] >= '” + DateTime.Today.ToString(“d”) + StartHHmm+“’ AND [Received] < '”+ DateTime.Today.ToString(“d”) + EndHHmm+ “'”

but it return 0 email.

how can I solve this problem.
I want all email from MM/dd/yyyy HH:mm to MM/dd/yyyy HH:mm.
Please help.

add a space before StartHHmm and EndHHmm

like this

"[Received] >= '" + DateTime.Today.ToString("d") + " " + StartHHmm + "' AND [Received] < '"+ DateTime.Today.ToString("d") + " " +EndHHmm + "'"

Thanks Jack. its works…

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.