kamagra bombone novi sad

Wednesday, August 24, 2016

Date Time string formatting in ASP.NET

December 24, 2009 by · 1 Comment 

With the following code you can format a DateTime within a Databind. <%# DateTime.Parse(Eval("DateModified").ToString()).ToString("MM-dd-yyyy")%> Some more format specifiers that can change format of datetime objects the way it is required. Format specifier Name d Short date pattern D Long date pattern t Short time pattern T Long time pattern f Full date/time pattern ( short […]

Calculating difference of dates in Oracle

November 18, 2009 by · Leave a Comment 

How to calculate difference between two dates in oracle, as subtraction of dates returns numeric value as difference. With some slight changes/enhancements we can track back the subtraction values to some readable date formats: Here are some examples, these can also be amended for user convenience: SQL> SELECT floor(((date1-date2)*24*60*60)/3600) 2 || ‘ HOURS ‘ || […]

Find week start/end given week number

November 3, 2009 by · Leave a Comment 

I have a table with some dated records. I wanted to do some weekly reports on this data. MySQL has a nifty function dubbed WEEK() which will return a week number. It allows you to break your data into week long intervals very easily. For example, the following query will tell me how many records […]

How To Calculate the Number of Week Days Between two Dates

November 1, 2009 by · 1 Comment 

If the start date and end date are both week days, then the total number of week days in between is simply: (total difference in days) – (total difference in weeks) * 2 DateDiff(dd, @start, @end) – DateDiff(ww, @start, @end)*2 … since the DateDiff() function with weeks returns the number of week "boundaries" that are […]