get current date in yyyy-mm-dd format nodejs code example Example: js date format yyyy-mm-dd yourDate.toISOString().split('T')[0]