0

Dealing with java date is my biggest fight since forever.

I just received date like for example: 1998-01-05T00:01:00+01:00

Is there a way to get the first 10 characters without cutting string? Angular2 offers date pipe but I don't know if and how could I use that here.

Thank you for your help.

PS: java.sql.Date is not an option

elzoy
  • 5,237
  • 11
  • 40
  • 65
  • Are working in javascript or in java? – Nikem May 28 '16 at 20:05
  • Date was actually sent from backend (Java) to frontend (Angular2) as java.util.Date. Now I'm thinking how could I parse it in frontend side (typescript + javascript). – elzoy May 28 '16 at 20:13

1 Answers1

0

I just resolve this problem thanks to Angular2 DatePipe processing ISO 8601 Date (Invalid argument '*' for pipe 'DatePipe')?

I've created my own pipe.

Community
  • 1
  • 1
elzoy
  • 5,237
  • 11
  • 40
  • 65