how to join two table in codeigniter easily[updated] | ci_model | ci_controller | codeigniter 3 -datainflow
Change date format moment
If you want to change date format using jquery ,then you have to use moment jquery library for that.You can change date format mm/dd/yyyy, mm-dd-yyyy, DD-MM-YYYY, yyyy-mm-dd to this using this library.
Using moment js library , you can change date format from string date.This library also provides to compare date, difference between two dates etc.
moment(testDate).format('MM/DD/YYYY');
The 2nd argument to moment() is a parsing format rather than an display format.For that, you want the .format() method:
Before using function , You have to call the moment library in web page.
https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js
Related posts
nice post