<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Asrar Ahmad Ehsan on Medium]]></title>
        <description><![CDATA[Stories by Asrar Ahmad Ehsan on Medium]]></description>
        <link>https://medium.com/@asrarahmadehsan?source=rss-72f086ffa609------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hCTvotsGdVHyxZB-RUkoKw.jpeg</url>
            <title>Stories by Asrar Ahmad Ehsan on Medium</title>
            <link>https://medium.com/@asrarahmadehsan?source=rss-72f086ffa609------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:30:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asrarahmadehsan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Get only Time with AM & PM from datetime in SQL Server]]></title>
            <link>https://medium.com/@asrarahmadehsan/get-only-time-with-am-pm-from-datetime-in-sql-server-5d74bcaa7385?source=rss-72f086ffa609------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d74bcaa7385</guid>
            <dc:creator><![CDATA[Asrar Ahmad Ehsan]]></dc:creator>
            <pubDate>Mon, 01 Apr 2019 07:23:58 GMT</pubDate>
            <atom:updated>2019-04-01T07:23:58.405Z</atom:updated>
            <content:encoded><![CDATA[<h3>Get only Time with AM &amp; PM from DateTime in SQL Server</h3><p>Recently I was required to extract just <strong>time with AM &amp; PM </strong>from a <strong>datetime </strong>field in SQL Server. So I used a function called <strong>cast()</strong> to get only time part and <strong>convert()</strong> function to format the extracted time. <strong>Convert()</strong> is a SQL Server function which is a very strong function for converting not only date and time but many types of data in SQL Server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jsfydvDbbbV-ybk43FFwSw.png" /><figcaption><a href="https://image.flaticon.com/sprites/share/packs/171166-time-and-date-icon-set.png">https://image.flaticon.com/sprites/share/packs/171166-time-and-date-icon-set.png</a></figcaption></figure><p>First of all, I need a datetime value to get the time from it for this purpose we can use the current <strong>datetime</strong>. In order to get the current date and time, we will be using a function called <strong>getdate() </strong>to get the current date and time.</p><pre>SELECT GETDATE();</pre><pre>-- Output:<br>2019-03-31 08:12:08.600</pre><p>Now, In order to get just time from the above output we will be using <strong>CAST()</strong> function as following.</p><pre>SELECT CAST(‘2019–03–31 08:12:08.600’ AS TIME)</pre><pre>-- Output:<br>08:12:08.6000000</pre><p>We did get the time but the output is not in the format as we wanted to be, we want the time to be like <strong>8:12 AM</strong>. So we need just one more step to format the extracted time as we mentioned. For formatting we will be using <strong>CONVERT() </strong>function as following.</p><pre>SELECT CONVERT(VARCHAR(10), CAST(‘2019–03–31 08:12:08.600’ AS TIME), 0)</pre><pre>-- Output:<br>8:12AM</pre><p>In the above code, <strong>convert </strong>function got 3 parameters:</p><ol><li>The first parameter is the data type to which the result will be converted.</li><li>The second parameter is the time passed to the function.</li><li>The third parameter is the style which specifies the format, in this case we use 0 or 100 to get what we want.</li></ol><p>For more information on <strong>Convert </strong>function and its styles visit the following link.</p><p><a href="https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-2017">CAST and CONVERT (Transact-SQL) - SQL Server</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d74bcaa7385" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EXECUTE permission denied on object ‘aspnet_CheckSchemaVersion’, database ‘XXX’]]></title>
            <link>https://medium.com/@asrarahmadehsan/execute-permission-denied-on-object-aspnet-checkschemaversion-database-xxx-620f1afbbeb8?source=rss-72f086ffa609------2</link>
            <guid isPermaLink="false">https://medium.com/p/620f1afbbeb8</guid>
            <category><![CDATA[aspnet]]></category>
            <dc:creator><![CDATA[Asrar Ahmad Ehsan]]></dc:creator>
            <pubDate>Sun, 24 Mar 2019 10:58:40 GMT</pubDate>
            <atom:updated>2019-03-24T10:58:40.299Z</atom:updated>
            <content:encoded><![CDATA[<p>I faced this error while opening my web application after I restored the database to my local system.</p><p>For solving this problem, follow the following steps:</p><ol><li>open SSMS, go to your database and expand ‘Security’ section then expand ‘Users’, in the users list select your asp.net user in my case my web application uses windows authentication so I select ‘IIS APPPOOL\.NET v2.0’ User.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*wBfbZLcrPkgAwA4rzKSqRw.png" /></figure><p>2. Go to the properties of the selected user, in left pane, go to membership tab and chose the following member role <br>1) aspnet_Membership_BasicAccess<br>2) aspnet_Membership_FullAccess<br>3) db_owner<br>then click Ok, that is it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*b7qnWKO5qrI5b_1-xNYBsw.png" /></figure><p>Go back to your web browser and open your web application, you will open your application without any error.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=620f1afbbeb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices Architectural Pattern]]></title>
            <link>https://medium.com/@asrarahmadehsan/microservices-architectural-pattern-ac9a1fb8fd58?source=rss-72f086ffa609------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac9a1fb8fd58</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Asrar Ahmad Ehsan]]></dc:creator>
            <pubDate>Wed, 24 Aug 2016 05:45:13 GMT</pubDate>
            <atom:updated>2016-08-24T05:45:13.788Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*7GHrczUPMGGhJfWF9990Sg.png" /><figcaption>Mircoservices Architectural Pattern</figcaption></figure><p>Microservices is an Architectural Pattern that deals with dividing a complex application into one or more services, each services has to do only one task and do it very well.</p><p>Services can be developed in different languages via small teams and can be easily deployed independently and these services communicate with each other via APIs.</p><p>Microservices is a good architectural pattern for large and complex application to be broken into small and independent pieces (Services), each piece (service) has its own functionality. But the disadvantage of Microservices is that it makes the application a little bit complex because different services form the application each services may have been developed in different programming languages and has its own data storage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac9a1fb8fd58" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>