Suchen
Aktuell
- Aktuell
- Kommentare
- TagCloud
- Windows Phone 7: Silverlight und XNA
- 1267769400 1267769400 - Keine Kommentare
- Empfehlung: Microsoft Arc Keyboard
- 1266747660 1266747660 - 2 Kommentare
- C#: Outlook like Pop-up Alert
- 1264008720 1264008720 - Keine Kommentare
- Windows Mobile 7 - Verschiedene Versionen geplant
- 1264007340 1264007340 - Keine Kommentare
- Windows Media Center: Pixelfehler am rechten Rand
- 1260208800 1260208800 - Keine Kommentare
- Das Outlook Fenster kann nicht geöffnet werden #2
- 1259409180 1259409180 - 13 Kommentare
- Bis jetzt sind noch keine Kommentare geschrieben worden
.Net
Suche
ASP.Net
Asp.Net
Beta
Buchtipp
C#
CentOS
CoD
DateTime
DiceFight
Funktion
HTML
HowTo
HttpWebRequest
IIS7
JSON
Konfiguration
LCD
Lighttpd
Linux
Media
Microsoft
Mobile
Mono
MySQL
Oracle
Outlook
PHP
PostgreSQL
Programme
Quake3
RC
RealURL
SMTPE
SVN
Server
Snippet
TYPO3
Timeout
Treiber
Tutorial
USB
Vista
WebClient
Windows
bauer-martin.com
bm_chart
ffmpeg
x64
Randnotiz
W3C
Tutorials, Datenbanken - 21.11.2008 11:43 - Alter: 1 yrs
- Keine Kommentare
- Keine Kommentare
Oracle und Funktion UNIX_TIMESTAMP
Tags: Oracle, MySQL, Timestamp
Bei MySQL gibt es eine ganz nützliche Funktion namens "UNIT_TIMESTAMP". Diese konvertiert einen MySQL-Timestamp in einen UNIX-Timestamp (Sekunden seit 01.01. 1970 01:00). Vor allem bei der Verwendung mit PHP ist dies oft sehr nützlich. Leider hat Oracle diese nicht Standardmäßig implementiert, so dass man sich diese erst nachträglich schreiben muss.
CREATE OR REPLACE FUNCTION unix_timestamp (oracletime IN DATE)
RETURN INTEGER AS
unixtime integer;
BEGIN
unixtime := (oracletime - to_date('19700101','YYYYMMDD')) * 86400;
RETURN unixtime;
END;
Kommentare
- Bis jetzt sind noch keine Kommentare geschrieben worden



