title: Save current date and user Input to Firebase Firestore
body: <p>I am making a note-saving app using Firebase Firestore and a RecyclerView.</p>
  <p>So far users are able to enter the title and content of the note, this saves and works fine.</p>
  <p>What I would like to add is the current date (in a &quot;dd/MM/yy&quot; format) when the user saves the note to be displayed in the recycler view the notes are displayed in.</p>
  <p>My code for adding the note is as follows</p>
  <pre><code>public class AddWellbeingActivity extends AppCompatActivity {
  
  private static final String TAG = &quot;AddWellbeingActivity&quot;;
  EditText createtitleofnote, createcontentofnote;
  FloatingActionButton savenote;
  FirebaseAuth firebaseAuth;
  FirebaseUser firebaseUser;
  FirebaseFirestore firebaseFirestore;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_add_wellbeing);
  
      savenote = findViewById(R.id.saveNote);
      createcontentofnote = findViewById(R.id.createContentNote);
      createtitleofnote = findViewById(R.id.createTitleNote);
  
      firebaseAuth = FirebaseAuth.getInstance();
      firebaseFirestore = FirebaseFirestore.getInstance();
      firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
      
  
      savenote.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              String title = createtitleofnote.getText().toString();
              String content = createcontentofnote.getText().toString();
  
  
              if(title.isEmpty() || content.isEmpty())
              {
                  Toast.makeText(getApplicationContext(), &quot;Both fields are Required&quot;, Toast.LENGTH_SHORT).show();
              }
              else
              {
                  DocumentReference documentReference = firebaseFirestore.collection(&quot;notes&quot;).document(firebaseUser.getUid()).collection(&quot;myNotes&quot;).document();
                  Map&lt;String, Object&gt; note = new HashMap&lt;&gt;();
                  note.put(&quot;title&quot;,title);
                  note.put(&quot;content&quot;, content);
  
                  documentReference.set(note).addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
                      @Override
                      public void onSuccess(Void aVoid)
                      {
                          Toast.makeText(getApplicationContext(), &quot;Wellbeing entry saved&quot;, Toast.LENGTH_SHORT).show();
                          startActivity(new Intent(AddWellbeingActivity.this, WellbeingActivity.class));
  
                      }
                  }).addOnFailureListener(new OnFailureListener() {
                      @Override
                      public void onFailure(@NonNull Exception e)
                      {
                          Toast.makeText(getApplicationContext(), &quot;Wellbeing entry failed to save&quot;, Toast.LENGTH_SHORT).show();
                      }
                  });
  
              }
          }
      });
  }
  </code></pre>
  <p>If anyone has a solution it would be greatly appreciated</p>