Hi All
We have a search utility that needs to search by date:
So I type in a date "04-20-1982" in the search field. In the code:
Alert.show("string date::"+message.searchKeyword);
dateOfBirth = DateField.stringToDate(message.searchKeyword,"MM-DD-YYYY");
Alert.show("date::"+dateOfBirth);
The first alert prints as string date::04-20-1982
The second alert prints as date::Tue Apr 20 00:00:00 GMT-0400 1982
The issue is our timezone is EST and since it changes it as GMT -400, it takes the time as Mon Apr 19 23:00:00 EST 1982 and does not return any results. The actual DOB in the DB is Apr 20 1982.
So please let me know how to avoid this conversion to GMT -400 Timezone and just send it as a date without any timezone.
Thanks
Harish