1 Reply Latest reply on Feb 26, 2010 1:58 PM by rgadiparthi

    How to set the Date() timestamp to midnight?

    stickamw

      Hi guys,

       

           I'm probably completely brain-farting this but here goes...I need to pass a start date and end date range into my query...On page load, it's automatically set to today's date...I am defaulting to

       

           var startDate:Date = new Date();

           var endDate:Date = new Date();

       

           This sets up both with the current date time...no biggie...but since I need all the records for the day, I need the timestamps on both reset...the startDate set to 00:00:00 and the endDate set to 11:59:59.

       

           But how the heck do I do it?!?!  I can't just add to the time because a user can log in whenever... I've tried brute force setting the time like:

       

           endDate.hours = 11;

           endDate.minutes = 59;

       

           ...without luck.  Any ideas would be greatly appreciated!!!

       

      Thanks,

      Adrian