Get Start of Each Week for Current Month

< %@ Page Language="C#" AutoEventWireup="true"  CodeFile="default.aspx.cs" Inherits="_Default" %>                                                    <html>
<p><asp:label runat="server" id="GreetingLabel"></asp:label></p>
<p><asp:label runat="server" id="WeekLabel"></asp:label></p>
<p><asp:label runat="server" id="SeasonLabel"></asp:label></p>
</html>

using System;
using System.Data;
using System.Configuration;
using System.Globalization;
using System.Web;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Set Current DateTime
        DateTime Today = DateTime.Today;
        
        //Create Display Greeting
        int CurrentHour = int.Parse(DateTime.Now.ToString("HH"));
        GreetingLabel.Text = GetGreeting(CurrentHour) + "Happy " + Today.DayOfWeek.ToString() + "<br />";
        
        //Create Season Hours
        int CurrentMonth = int.Parse(Today.Month.ToString());
        SeasonLabel.Text = "<a href=\"" + GetSeason(CurrentMonth) + Today.ToString("yyyy") + ".xlsx\">" + GetSeason(CurrentMonth) + " " + Today.ToString("yyyy") + " Hours" + "</a>";    
        
        //Create Weeks for the Month
        //Calculate Number of Days in the Month and Print the Weeks for the Month
        //DateTime FirstDayOfCurrentMonth = new DateTime(Today.Year, Today.Month, 1);
        DateTime FirstDayOfCurrentMonth = DateTime.Parse("2016/01/01 18:37:58");
        DateTime FirstDayOfNextMonth = FirstDayOfCurrentMonth.AddMonths(1);
        DateTime FirstDayOfCurrentWeek = GetFirstDayOfWeek(FirstDayOfCurrentMonth, DayOfWeek.Sunday);

        while (FirstDayOfCurrentWeek < FirstDayOfNextMonth)
        {
            WeekLabel.Text += "<p>Week of " + FirstDayOfCurrentWeek.ToString("MMMM") + " " + FirstDayOfCurrentWeek.Day + GetDateSuffix(FirstDayOfCurrentWeek.Day) + "";
            
            FirstDayOfCurrentWeek = FirstDayOfCurrentWeek.AddDays(7);
        }
    }
    
    public static DateTime GetFirstDayOfWeek(DateTime dayInWeek, DayOfWeek firstDay) 
    {
        int difference = ((int)dayInWeek.DayOfWeek) - ((int)firstDay);
        difference = (7 + difference) % 7;
        return dayInWeek.AddDays(-difference).Date;
    }

    public static DateTime GetFirstDayOfWeek(DateTime dayInWeek) 
    {
        return GetFirstDayOfWeek(dayInWeek, CultureInfo.CurrentCulture);
    }
    
    public static DateTime GetFirstDayOfWeek(DateTime dayInWeek, CultureInfo cultureInfo) 
    {
        return GetFirstDayOfWeek(dayInWeek, cultureInfo.DateTimeFormat.FirstDayOfWeek);
    }

    public    static string GetGreeting(int Hour)
    { 
        string Greeting = "";    
        
        if (Hour < 12)
        {
            Greeting = "Good Morning! ";
        }
        else if (Hour > 12 && Hour < 17) 
        {
            Greeting = "Good Afternoon! ";
        }
        else
        {
            Greeting = "Good Evening! ";
        }
            
        return Greeting;
     }

    public    static string GetDateSuffix(int Day)
    { 
        string DaySuffix = "";
        
        switch (Day)
        {
            case 1:
            case 21:
            case 31:
                DaySuffix = "st";
                break;
            case 2:
            case 22:
                DaySuffix = "nd";
                break;
            case 3:
            case 23:
                DaySuffix = "rd";
                break;
            default:
                DaySuffix = "th";
                break;
        }
            
        return DaySuffix;
     }

    public    static string GetSeason(int Month)
    { 
        string Season = "";
        
        if (Month >= 1 || Month < 5)
        {
            Season = "Spring";
        }
        else if (Month >= 5 || Month < 9)
        {
            Season = "Summer";
        }
        else 
        {
            Season = "Fall";
        }
            
        return Season;
     }     
}

How to Convert Epoch Time to Eastern Time in MS SQL

USE [DATABASE]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        Leonard Nelson
-- Create date: 01/11/2011
-- Description:    Convert Eastern Time to Epoch Time. 
-- Definition: Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)
-- Syntax: SELECT dbo.FunctionConvertToEpochTime('2011-01-19 16:27:15')
-- 1/19/2011 4:27:15 PM EST = 1295472435
-- =============================================
ALTER FUNCTION [dbo].[FunctionConvertToEpochTime]
(
    @InputLocalTime nvarchar(19)
)
RETURNS int
AS
BEGIN

-- Convert the Input Time Stamp to 24 hour format yyyy-mm-dd hh:mi:ss
SET @InputLocalTime = CONVERT(nvarchar, @InputLocalTime, 120);

DECLARE @EpochTime int, @UTCTime datetime, @CurrentTimeZoneOffset int, @TimeZoneOffset int;

-- Set the Time Zone Offset
SET @CurrentTimeZoneOffset = DATEDIFF(hh, GETUTCDATE(), GETDATE());

-- Set the Eastern Time Zone and factor for Daylight Savings Time Offset
SET @TimeZoneOffset =
    CASE 
        -- The schedule through 2006 in the United States was that DST began on the first Sunday in April 
        -- (April 2, 2006), and changed back to standard time on the last Sunday in October (October 29, 2006). 
        -- The time is adjusted at 02:00 local time.    
        WHEN YEAR(@InputLocalTime) < = 2006 THEN
            CASE 
                WHEN 
                      CAST(@InputLocalTime AS datetime) >=  '4/' + CAST(ABS(8-DATEPART(dw,'4/1/' + CAST(YEAR(@InputLocalTime) as varchar)))%7 + 1 as varchar) +  '/' + CAST(YEAR(@InputLocalTime) as varchar) + ' 2:00' 
                  AND 
                      CAST(@InputLocalTime AS datetime) < '10/' + CAST(32-DATEPART(dw,'10/31/' + CAST(YEAR(@InputLocalTime) as varchar)) as varchar) +  '/' + CAST(YEAR(@InputLocalTime) as varchar) + ' 2:00' 
                THEN 
                    -- Time Zone EST DST Offset should be 4
                    -4
                ELSE
                    -- Time Zone EST DST Offset should be 5
                    -5
            END
        ELSE
            CASE
            -- By the Energy Policy Act of 2005, daylight saving time (DST) was extended in the United States in 2007. 
            -- DST starts on the second Sunday of March, which is three weeks earlier than in the past, and it ends on 
            -- the first Sunday of November, one week later than in years past. This change resulted in a new DST period 
            -- that is four weeks (five in years when March has five Sundays) longer than in previous years.[35] In 2008 
            -- daylight saving time ended at 02:00 on Sunday, November 2, and in 2009 it began at 02:00 on Sunday, March 8.[36]
                WHEN
                      CAST(@InputLocalTime AS datetime) >= '3/' + CAST(ABS(8-DATEPART(dw,'3/1/' + CAST(YEAR(@InputLocalTime) as varchar)))%7 + 8 as varchar) +  '/' + CAST(YEAR(@InputLocalTime) as varchar) + ' 2:00' 
                  AND 
                      CAST(@InputLocalTime AS datetime)  < '11/' + CAST(ABS(8-DATEPART(dw,'11/1/' + CAST(YEAR(@InputLocalTime) as varchar)))%7 + 1 as varchar) +  '/' + CAST(YEAR(@InputLocalTime) as varchar) + ' 2:00'
                THEN 
                    -- Time Zone EST DST Offset should be 4
                    -4
                ELSE
                    -- Time Zone EST DST Offset should be 5
                    -5
            END
        END

-- Set the TimeZoneDSTOffset 
IF @TimeZoneOffset > 0
    BEGIN
        SET @TimeZoneOffset = -ABS(@TimeZoneOffset);
    END
ELSE
    BEGIN
        SET @TimeZoneOffset = ABS(@TimeZoneOffset);
    END

-- Add the Time Zone DST Offset to the Input Time Stamp to calculate the UTC Time
SET @UTCTime = DATEADD(hour, @TimeZoneOffset, @InputLocalTime);

-- Subtract the number of seconds to calculate Epoch Time
SET @EpochTime = DATEDIFF(s, '1970-01-01 00:00:00', @UTCTime);

-- Return the EpochTime
RETURN (@EpochTime);
END

How to Convert Eastern Time to Epoch Time in MS SQL

USE [DATABASE]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        Leonard Nelson
-- Create date: 02/08/2011
-- Description:    Convert Epoch Time to Local Time.
-- Definition: Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT)
-- Syntax: SELECT dbo.FunctionConvertToLocalTime('1295472435')
-- 1/19/2011 4:27:15 PM Eastern Standard Time = 1295472435
-- =============================================
ALTER FUNCTION [dbo].[FunctionConvertToLocalTime]
(
    @InputEpochTime int
)
RETURNS datetime
AS
BEGIN

DECLARE @CurrentTimeZoneOffset int, @TimeZoneOffset int, @LocalTime datetime, @UTCTime datetime;

-- Add the Epoch Time seconds value to the '1970-01-01 00:00:00'
SET @UTCTime = DATEADD(second, @InputEpochTime, CAST('1970-01-01 00:00:00' as datetime));

-- Set the Time Zone Offset
SET @CurrentTimeZoneOffset = DATEDIFF(hh, GETUTCDATE(), GETDATE());

-- Set the Eastern Time Zone and factor for Daylight Savings Time Offset
SET @TimeZoneOffset =
    CASE 
        -- The schedule through 2006 in the United States was that DST began on the first Sunday in April 
        -- (April 2, 2006), and changed back to standard time on the last Sunday in October (October 29, 2006). 
        -- The time is adjusted at 02:00 local time.    
        WHEN YEAR(@UTCTime) < = 2006 THEN
            CASE 
                WHEN 
                      CAST(@UTCTime AS datetime) >=  '4/' + CAST(ABS(8-DATEPART(dw,'4/1/' + CAST(YEAR(@UTCTime) as varchar)))%7 + 1 as varchar) +  '/' + CAST(YEAR(@UTCTime) as varchar) + ' 2:00' 
                  AND 
                      CAST(@UTCTime AS datetime) < '10/' + CAST(32-DATEPART(dw,'10/31/' + CAST(YEAR(@UTCTime) as varchar)) as varchar) +  '/' + CAST(YEAR(@UTCTime) as varchar) + ' 2:00' 
                THEN 
                    -- Time Zone EST DST Offset should be 4
                    -4
                ELSE
                    -- Time Zone EST DST Offset should be 5
                    -5
            END
        ELSE
            CASE
            -- By the Energy Policy Act of 2005, daylight saving time (DST) was extended in the United States in 2007. 
            -- DST starts on the second Sunday of March, which is three weeks earlier than in the past, and it ends on 
            -- the first Sunday of November, one week later than in years past. This change resulted in a new DST period 
            -- that is four weeks (five in years when March has five Sundays) longer than in previous years.[35] In 2008 
            -- daylight saving time ended at 02:00 on Sunday, November 2, and in 2009 it began at 02:00 on Sunday, March 8.[36]
                WHEN
                      CAST(@UTCTime AS datetime) >= '3/' + CAST(ABS(8-DATEPART(dw,'3/1/' + CAST(YEAR(@UTCTime) as varchar)))%7 + 8 as varchar) +  '/' + CAST(YEAR(@UTCTime) as varchar) + ' 2:00' 
                  AND 
                      CAST(@UTCTime AS datetime) < '11/' + CAST(abs(8-DATEPART(dw,'11/1/' + CAST(YEAR(@UTCTime) as varchar)))%7 + 1 as varchar) +  '/' + CAST(YEAR(@UTCTime) as varchar) + ' 2:00'
                THEN 
                    -- Time Zone EST DST Offset should be 4
                    -4
                ELSE
                    -- Time Zone EST DST Offset should be 5
                    -5
            END
        END

IF @TimeZoneOffset > 0
    BEGIN
        SET @TimeZoneOffset = ABS(@TimeZoneOffset);
    END
ELSE
    BEGIN
        SET @TimeZoneOffset = -ABS(@TimeZoneOffset);
    END
    
-- Add the Time Zone DST Offset to the Input Time Stamp to calculate the UTC Time
SET @LocalTime = DATEADD(hour, @TimeZoneOffset, @UTCTime);

-- Convert Local Time to 24 hour format yyyy-mm-dd hh:mi:ss
SET @LocalTime = CONVERT(datetime, @LocalTime, 120);

-- Return the LocalTime
RETURN (@LocalTime);
END