title: FQL Query to get Facebook Friends Birthdays in next 30 days using Android
body: <p>I am writing Android Application, in which i am <em>fetching list of friends those birthdays in current month</em> by using below code:</p>
  
  <pre><code>Calendar c = Calendar.getInstance();
  int month = c.get(Calendar.MONTH) + 1;
  String query = "select name, birthday, uid, pic_square from user 
  where  (substr(birthday_date, 0, 2) =" + month +") AND uid IN 
  (SELECT uid2 FROM friend WHERE uid1 = me()) order by birthday_date ASC";
  </code></pre>
  
  <p>but now i want to <strong>fetch list of facebook friends those birthdays in next 30 days</strong>, i know the <em>java code to get next 30 days by using current date</em> like below:</p>
  
  <pre><code>    Date today = new Date();
      Calendar cal = new GregorianCalendar();
      cal.setTime(today);
      cal.add(Calendar.DAY_OF_MONTH, +30);
      Date today30 = cal.getTime();
  </code></pre>
  
  <p>I know Python query to fetch Birthdays coming in next 30 days, but i don't know what code i need to use in Java, if possible so please replace write below query in Java for me:-</p>
  
  <pre><code> query = "SELECT username FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND (substr(birthday_date, 0, 2) = {0} AND substr(birthday_date, 3, 5) &gt;= {1} AND substr(birthday_date, 3, 5) &lt;= {2})").format(today.strftime("%m"), today.strftime("%d"), today30.strftime("%d");
  </code></pre>
  
  <p><strong>So here i just want to replace python code to java code</strong></p>