Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add date function to get current date without time component #1936

Closed
paulrutter opened this issue Jun 18, 2024 · 4 comments
Closed

Add date function to get current date without time component #1936

paulrutter opened this issue Jun 18, 2024 · 4 comments

Comments

@paulrutter
Copy link
Contributor

paulrutter commented Jun 18, 2024

Please introduce a function to get the current date without time component, so this is no longer needed:

DATE(YEAR(NOW()) + '-' + MONTH(NOW()) + '-' + DAY(NOW()))

See https://www.w3schools.com/sql/func_mysql_curdate.asp for example.

paulrutter added a commit to blueconic/alasql that referenced this issue Jun 18, 2024
@paulrutter
Copy link
Contributor Author

#1937

@paulrutter
Copy link
Contributor Author

Naming of the function is up for debate.

@paulrutter
Copy link
Contributor Author

'DATEDIFF' return 'DATEDIFF'
probably needs updating as well.

paulrutter added a commit to blueconic/alasql that referenced this issue Jun 19, 2024
paulrutter added a commit to blueconic/alasql that referenced this issue Jun 19, 2024
mathiasrw pushed a commit that referenced this issue Jul 8, 2024
* #1936 Add date function to get current date without time component
- Add CURDATE method to AlaSQL
- Add test

* #1936 Add date function to get current date without time component
- Support dateAsString option
- Extend tests

* #1936 Add date function to get current date without time component
- Add CURRENT_DATE alias
- Extend test

* - Fix running the parser in package.json
- Add rebuild parser documentation
- Add CURDATE/CURRENT_DATE to parser definition
- Allow both with and without parenthesis
- Adjust test

* - Use tabs

* - Use alias to prevent duplicate code for CURRENT_DATE

* - Update dependencies
mathiasrw pushed a commit that referenced this issue Jul 8, 2024
* #1936 Add date function to get current date without time component
- Add CURDATE method to AlaSQL
- Add test

* #1936 Add date function to get current date without time component
- Support dateAsString option
- Extend tests

* #1936 Add date function to get current date without time component
- Add CURRENT_DATE alias
- Extend test

* - Fix running the parser in package.json
- Add rebuild parser documentation
- Add CURDATE/CURRENT_DATE to parser definition
- Allow both with and without parenthesis
- Adjust test

* - Use tabs

* - Use alias to prevent duplicate code for CURRENT_DATE

* - Update dependencies
@paulrutter
Copy link
Contributor Author

Fixed in #1937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant