Date Filter in Angular

DateFilter in Angular:-


<html>

    <head>

        <title>Date Formats in Angular</title>

        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>

    </head>


    <body>


        <div ng-app="" style="font-size: larger; color: darkblue;">


            <h1 align="center">Changing Date Format using Angular Date Filter</h1>


            <input type="date" ng-model="MyDate">

            <br><br>


            <span>Short Date Format (M/d/yy):</span><br> {{MyDate | date : 'shortDate'}}

            <br><br>


            <span>Medium Date Format (MMM d, y):</span><br> {{MyDate | date : 'mediumDate'}}

            <br><br>


            <span>Long Date Format (MMMM d, y):</span><br> {{MyDate | date : 'longDate'}}

            <br><br>


            <span>Full Date Format (EEEE, MMMM d, y):</span><br> {{MyDate | date : 'fullDate'}}

            <br><br>


            <span>yy-mm-dd Format:</span><br> {{MyDate | date : 'yy-MM-dd'}}

            <br><br>


            <span>dd-mm-yy Format:</span><br> {{MyDate | date : 'dd-MM-yy'}}



            

        </div>

        

    </body>

</html>


Subscribe Tech Sharmit for more videos on Angular

Please refer to the below video for the same topic.                 



Comments

Popular posts from this blog

Dynamic XMl file creation in IFS using RPGLE Program - IBMI / AS400

Compile Time Data Array in RPGLE - IBM i / AS400

Numeric Data type in RPGLE free format - IBM i / AS400