0

I need last Sunday date with whole day time count. By using this

 DateAdd(DateInterval.Day, -0,DateAdd(DateInterval.Day, 1-Weekday(today),Today)

I am getting time As 12AM, but I need all day time.

Vega
  • 27,856
  • 27
  • 95
  • 103
  • 1
    please format your code and give more contextual information... – Tommy Brettschneider Jun 26 '20 at 10:01
  • [link](http://example.com) _italic_ **bold** `code` i am using two parameters as @from and @to date's , i need to get last monday date as default value in from date and i need to get last sunday date as default value in to date i need to get records between this two date's,from date starting from 12AM i am getting that day records ,for to(sunday) starting 12 AM i am unable to get sunday records. i want default value as last sunday and get that day records too. @Tommy Brettschneider – saikumar Jun 26 '20 at 12:15
  • If you are using SQL Server as a back end, then have a look at this https://stackoverflow.com/questions/12422248/previous-monday-previous-sundays-date-based-on-todays-date – Harry Jun 29 '20 at 02:29
  • [link](http://example.com) _italic_ **bold** `code` i am getting date of last sunday but that day records are not coming,if i check time of that date is is showing 12AM @Harry – saikumar Jun 29 '20 at 11:16
  • @saikumar can you show what your data looks like? – Harry Jun 29 '20 at 21:01

0 Answers0