Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SQL Datumsfunktion / Schaltjahr

Empfohlene Antworten

Hallo,

vermutlich fast zu lächerlich um hier einen Thread zu eröffnen, aber sorry....ich bekomm es nicht schön hin.

Ich habe einen Personentabelle, die u.a. ein Geburtsdatum beinhaltet.

Ich möchte nun wissen, an welchem Wochentag diese Person zb nächstes Jahr Geburtstag hat. Zu berücksichtigen ist, dass zb eine Person am 29.02 Geburtstag hat, also nur an einem Schaltjahr.

Danke

wenn du der werten leserschaft jetzt noch die verwendete datenbank verrätst, gibts vielleicht auch hinweise auf allenfalls existierende standardfunktionen.

SQL ist nämlich nicht gleich SQL.

s'Amstel

Stimmt natürlich, Oracle 10g Express

Danke

als ansatz:

select to_char(to_date('29.02.2008'), 'DAY') from dual;

FREITAG

s'Amstel

Hallo,

danke, die Datumsfunktion ist ist mir grundsätzlich bekannt.

Ich habe aber das Problem, dass ich hier zb wissen möchte, welche Personen nächstes Jahr an einem Montag Geburtstag haben. Daran scheitere ich!

Also gegeben: 'gebdat' (zb 29.02.1950)

Bearbeitet von joe_

Hi,

mit der Funktion add_months kannst Du Monate zu einem Datum hinzuzählen oder abziehen:

Das Datum in einem Jahr:

select add_months(sysdate,12) from dual
Das Datum vor 5 Monaten:
select add_months(sysdate,-5) from dual

Dim

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.