Bug #75558 Feature Request: Stardate function
| Submitted: | 19 Jan 2015 20:09 | Modified: | 28 Apr 2016 18:35 |
|---|---|---|---|
| Reporter: | Gillian Gunson (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: User-defined functions ( UDF ) | Severity: | S4 (Feature request) |
| Version: | 5.7 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | date, FUNCTION, stardate | ||
[19 Jan 2015 20:09]
Gillian Gunson
[20 Jan 2015 9:33]
Mark Leith
DROP FUNCTION IF EXISTS stardate;
DELIMITER $$
CREATE DEFINER='root'@'localhost' FUNCTION stardate (in_date DATETIME)
RETURNS TEXT
SQL SECURITY INVOKER
DETERMINISTIC
NO SQL
BEGIN
RETURN CONCAT(YEAR(in_date), '.', DAYOFYEAR(in_date));
END$$
DELIMITER ;
[20 Jan 2015 13:11]
MySQL Verification Team
Hello Gillian, Thank you for the feature request! Thanks, Umesh
[12 Feb 2015 19:10]
Federico Razzoli
Maybe it could be implemented as a timezone. This would avoid frequent conversions from/to UTC, which are quite annoying for enterprise users.
[28 Apr 2016 18:35]
Gillian Gunson
The stardate should probably be in PST given that Starfleet HQ is in San Francisco.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.