Geeks With Blogs

News


Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done Dates
Oracle Week Numbers
http://forums.oracle.com/fo... select to_char( date '2008-01-04', 'IW' ) from dual Basically, there are 3 to_char format models to get week number: * W - week number in a month * WW - week number in a year, week 1 starts at 1st of Jan * IW - week number in a year, according to ISO standard - alternative: ROUND(TO_NUMBER(TO_CHAR(dat... ......

Posted On Friday, August 28, 2009 7:42 AM

Show elapsed time on a WinfForm in C#
Mission: Show elapsed time on a WinfForm in C# thanks to Mahesh Chand original article: http://www.c-sharpcorner.co... 1) add stop & start buttons and a timer control on a web form 2) put code behind the buttons (below), that consumes the StopWatch class (below) public partial class Form1 : Form { static void Main() { Application.Run(new Form1()); } public Form1() { InitializeComponent(); } StopWatch ......

Posted On Tuesday, April 7, 2009 2:45 AM

Oracle - Get Months/Weeks/Days for a Date range, then outer join statistics so that there are no missing Months/Weeks/Days.
Oracle - Get Months/Weeks/Days for a Date range, then outer join statistics so that there are no missing Months/Weeks/Days. I had do produce data so that graphs could be build For a date range By Months/Weeks/Days Where sometimes there are zeroes (gaps) in the data. for whichever Months/Weeks/Days Lets say that you need to graph 4 months of monthly summarized Coupon Data in date range ‘1/18/2007’ to ‘4/12/2007’ for 3 Coupons (A, B, C) from CouponStats in another table that points to Coupons. In order ......

Posted On Saturday, January 19, 2008 4:16 AM

Oracle - Select a list of months for a Date Range
Oracle - Select a list of months for a Date Range Case 1 – the 13 months between '10/18/2007' & '11/17/2008' select add_months (trunc (to_date('10/18/2007','MM/D... 'MM'), 1*Level -1) Month FROM Dual CONNECT BY Level <= MONTHS_BETWEEN(to_date('11/... to_date('10/18/2007','MM/DD... + 1 order by month MONTH ---------------------- 1-Oct-2007 1-Nov-2007 1-Dec-2007 1-Jan-2008 1-Feb-2008 1-Mar-2008 1-Apr-2008 1-May-2008 1-Jun-2008 1-Jul-2008 1-Aug-2008 1-Sep-2008 1-Oct-2008 ......

Posted On Friday, January 18, 2008 9:33 PM

C# Format Date

C# Format Date

 

_attribute =

" effectiveDate=\"" + string.Format("dd/MM/yyyy", _value).ToString() + "\"";

Posted On Tuesday, September 12, 2006 1:08 PM

Get weeks from oracle
1) Last 180 days of Monday Starts: with weeks as ( select trunc(sysdate - 180, 'DAY') + 1 - 7 + (P.pivot*7) monday_start from dual D, (select rownum pivot from all_objects where rownum < ((((sysdate - (sysdate - 180)) + 1 ) / 7)) + 2) P order by monday_start ) select * from weeks 2) Weeks for specified data range Public Function Select_Weeks( _ ByVal Start_DateString As String, _ ByVal End_DateString As String, _ ByRef sSql As String) As DataSet Dim returnDs As New DataSet Try 'select 'trunc(to_date('02/2/1980',... ......

Posted On Friday, January 4, 2008 3:25 AM

Collection of Months Dates
Dim monthsDictionary As New Dictionary(Of String, Date) monthsDictionary = objDataAccess.Select_Months... _sEnd_Date) '--------------------------... 'loop thru monthsDictionary Items '--------------------------... Dim kvpCounter As Integer = -1 Dim kvpMax As Integer = monthsDictionary.Count - 1 For Each kvp As KeyValuePair(Of String, Date) In monthsDictionary kvpCounter += 1 '--------------------------... ......

Posted On Friday, January 4, 2008 3:22 AM

User Control for Date Range, aggregates simpler Date with Popup Calendar

I created a user control that encapsulates a date range, and aggregrates date user control below.

I converted user control from C# to VB available from article below, that pops up a calendar page

Original Article:  http://www.csharphelp.com/archives2/archive429.html

Posted On Thursday, September 20, 2007 8:05 AM

Oracle - format a date, Date Add, query by date
Oracle - format a date, Date Add Here is a query to format a date select distinct job_date, to_char(job_date, 'Dy DD-Mon-YYYY HH24:MI:SS') AS "job_date_text" from duhTable order by job_date desc "JOB_DATE" "job_date_text" "05-JAN-07" "Fri 05-Jan-2007 19:00:44" "05-JAN-07" "Fri 05-Jan-2007 08:00:37" "03-JAN-07" "Wed 03-Jan-2007 10:46:35" "29-DEC-06" "Fri 29-Dec-2006 08:00:38" Here is a query to get data “older than 5 days”: select * from duhTable latest Left Outer Join (Select loanxid, job_date, closebid ......

Posted On Wednesday, January 10, 2007 1:12 PM

Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net