# date2mysqlformat

> Converts JavaScript Date instance to string (mysql format)

Latest version **1.0.1** (published 2016-10-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install date2mysqlformat
pnpm add date2mysqlformat
yarn add date2mysqlformat
bun add date2mysqlformat
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-10-30 |
| First published | 2016-10-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Stefan Krajnik |
| Maintainers | stevik |
| Keywords | Date, nodejs |

## Links

- npm: https://www.npmjs.com/package/date2mysqlformat
- Repository: https://github.com/stefan-krajnik/Date2MysqlFormat
- Homepage: https://github.com/stefan-krajnik/Date2MysqlFormat#readme
- Issues: https://github.com/stefan-krajnik/Date2MysqlFormat/issues
- npm.io page: https://npm.io/package/date2mysqlformat

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-10-30
- 1.0.0 — 2016-10-30

## README

# Date2MysqlFormat

## Usage
`npm install date2mysqlformat --save`

```
const Date2MysqlFormat = require('date2mysqlformat');
```

### Date2MysqlFormat.dateOnly(date)
```
let now = new Date(); // Date instance  
let nowMysqlFormat = Date2MysqlFormat.dateOnly(now) // String => 2016-10-30 (YYYY-MM-DD)
```

### Date2MysqlFormat.dateAndTime(date)
```
let now = new Date(); // Date instance  
let nowMysqlFormat = Date2MysqlFormat.dateAndTime(now) // String => 2016-10-30 15:58:53 (YYYY-MM-DD HH:MM:SS)
```

---
_Source: https://npm.io/package/date2mysqlformat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
