Question: I'm trying to share some content of my AngularJS website in twitter using next link:

```
<a href="https://twitter.com/intent/tweet?text=http%3A%2F%2Fwww.test.yanpy.com%2Fes%2Fblog%2Frutas-para-navegar-por-ibiza-y-formentera">

```

When I click on it, the Twitter share page is opened. However, I would like to use Twitter Cards. I added this twitter cards tags in my page:

```
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@Yanpy_com">     
<meta name="twitter:title" content="Sailing routes around Ibiza and Formentera">
<meta name="twitter:description" content="Post description">
<meta name="twitter:image" content="http://yanpy.test.s3.amazonaws.com/img/blog/sailing-routes-around-ibiza-formentera/cala-salada-ibiza-1.jpg">

```

But for some reason it is not working. I used the Twitter card validator with my url: `http://www.test.yanpy.com/es/blog/rutas-para-navegar-por-ibiza-y-formentera`

It looks like it's ok. However, when called from my anchor in my website I just see the text field.

Answer: 
This should work:

```
select sub.comments_id, sub.comment, date_format(sub.date, '%b %d %Y'), sub.views 
from (select comments_id, comment, date, views from tablename where id=0) as sub;

```

The power of MySQL is in sub selection, take advantage of it.
Use the following query:

```
select date_format(str_to_date(date, '%Y-%m-%d %H:%i:%s'), '%b %d %Y') from tablename;

```

`str_to_date` converts string representation to `date` and `date_format` gets you the required formatted string.