How to format date in angularjs

Angular.js has a built-in date filter. demo You can see the supported date formats in the source for the date filter. edit: If you’re trying to get the correct format in the datepicker (not clear if you’re using datepicker or just trying to use it’s formatter), those supported format strings are here: https://api.jqueryui.com/datepicker/

Change date format in a Java string

Use LocalDateTime#parse() (or ZonedDateTime#parse() if the string happens to contain a time zone part) to parse a String in a certain pattern into a LocalDateTime. Use LocalDateTime#format() (or ZonedDateTime#format()) to format a LocalDateTime into a String in a certain pattern. Or, when you’re not on Java 8 yet, use SimpleDateFormat#parse() to parse a String in a certain pattern into a Date. Use SimpleDateFormat#format() to format a Date into a String in a certain pattern. See also: Java string to date … Read more

tech