You need to sign in to do that
Don't have an account?
jda
Date becomes datetime
I have a simple date declared using following way.
private date startOfTheWeek.
But when I try to print it out it also prints the time as 00:00:00. If the problem is only printing then I can work it around with format(). But the real problem is I have to use this value in SOQL to compare against a date field. Due to this problem the records are not getting matched even if they belong to the same date. Could someone please help?
See this link http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm
Appears you are using apex:outputText field to print the date.
If you use apex:outputField tag and bind it with the Custom Object instance, then you will not face this issue.
In the SOQL query, what is the type of the compared field?
Is it of Datetime format?