I have filtered Sentinel 2 images to get suitable cloud free images from the time period I require, however I cannot figure out how to extract the date from the images, but with my current code I get the error:
Date (Error) Date: Parameter 'value' is required.
// Define the image collection
var image = ee.ImageCollection(sent2
// filter to get only images in the date range we are interested in
.filterDate("2018-05-01", "2018-07-30")
// filter by polygon
.filterBounds(tiwi))
// sort the collection by cloud cover
.sort("CLOUD_COVERAGE_ASSESSMENT")
// select the first image i.e. the most cloud free image in the date range
.min();
// print the image to the console.
print("A Sentinel-2 scene:", image);
// Define visualization parameters in a JavaScript dictionary for true colour rendering. Bands 4,3 and 2 needed for RGB.
var trueColour = {
bands: ["B4", "B3", "B2"],
min: 0,
max: 3000
};
// Add the image to the map, using the visualization parameters.
Map.addLayer(image, trueColour, "true-colour image");
// Get the timestamp and convert it to a date.
var date = ee.Date(image.get('system:time_start'));
print('Timestamp: ', date);