"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Showing posts with label datetime. Show all posts
Showing posts with label datetime. Show all posts

Sunday, November 11, 2012

Fetch data between two dates in dataview rowfilter

 Fetch data between two dates in dataview rowfilter
DateTime from = Convert.ToDateTime(txtFrom.Text);
DateTime to = Convert.ToDateTime(txtTo.Text);
string dateFilterString = "CreatedOnFilter >= #" + from + "# AND CreatedOnFilter <= #" + to + "#";



If u had any trouble just ask, Happy to help u :)
 Stay Tune...
 Have a nice day... 'N happy Coding :)

Thursday, April 12, 2012

Next and Prev date using Jquery DateTime picker

Hi all,
Showing Next and Previous date of current date using Jquery.Biggest problem that you may find doing this will be date-time format.
                       var nextDayDate = $("#<%=txtDate.ClientID%>").datepicker('getDate', '+1d');
                        debugger;
                        nextDayDate.setDate(
nextDayDate.getDate() + 1);
                        //alert(nextDayDate);
                        nextDayDate=nextDayDate.
localeFormat('MM/dd/yyyy');
                        $("#<%=lblNxt.ClientID%>").
text(nextDayDate);
                        var PreVDayDate = $("#<%=txtDate.ClientID%>").
datepicker('getDate', '+1d');
                        PreVDayDate.setDate(
PreVDayDate.getDate() -1);
                        PreVDayDate =PreVDayDate.localeFormat('MM/
dd/yyyy');
                        $("#<%=lblPrev.ClientID%>").
text(PreVDayDate);

If u had any trouble just ask, 
Happy to help u :) Stay Tune...
 Have a nice day... 'N happy Coding 
:)

Wednesday, November 2, 2011

Difference between GETDATE() and GETUTCDATE()

Hi *.*,
Playing with date-time is one of the biggest headache to me. :( . i faced a problem recently with that. Server is located at one place and client at another place  so what happened is the date doesn't change for 4.15 hrs!!!!.
Later v solved by adding GMT along with that.
Here i'm sharing the SQL script helped to get out of that.