Learning MySQL - Date and Time Functions

Поділитися
Вставка
  • Опубліковано 13 жов 2024
  • This next tutorial is all about the Date and Time functions available in MySQL. Some are good for manipulating dates, some for calculating times and dates and others are good for formatting dates.
    MySQL Playlist: • Learning MySQL - Getti...
    SQL file with Queries from video: gist.github.co...
    MySQL function reference: dev.mysql.com/...
    MySQL format reference: dev.mysql.com/...
    MySQL unit reference: dev.mysql.com/...

КОМЕНТАРІ • 24

  • @MAMAKIJAANGUGU
    @MAMAKIJAANGUGU Рік тому

    Thanks for the information. So many functions covered in one video

  • @SmartSoftek
    @SmartSoftek 3 роки тому

    Thank you for the nice way of providing the information

  • @ricardoruiz2800
    @ricardoruiz2800 4 роки тому +1

    When saving a date of birth, should I save also its timezone? It seems to me it does not make any sense and DATE is more appropriate. What do you think?

  • @brahimnaitdaoud9977
    @brahimnaitdaoud9977 2 роки тому

    how to make a query displaying a condition date withe monthe and day and any year for example you want to display all the dates before black Friday either or before Christmas AND thank you in advence

  • @chrisschoeman2800
    @chrisschoeman2800 2 роки тому

    Thanks!

  • @shubhankarsharma2221
    @shubhankarsharma2221 2 роки тому

    How to find duration between datetime in hh:mm:ss format ,without tumediff,since it has its limitations?

  • @nourhene9865
    @nourhene9865 3 роки тому

    how can i know the time and date of login and logout in my site web or app ??

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 роки тому +1

      On your server-side page that processes the login or logout you need to get the current timestamp and save that in the database. In your USERS table where you save their login information have a column that tracks login time and/or logout time. This would give you the most recent values.
      You can also create a table for SESSIONS / TRACKING where you could save every login, every logout, and every transaction the user has with the database.
      You can use stored procedures for all your interactions that always include an INSERT into your sessions table.
      Lots of possibilities.

  • @Abbici
    @Abbici 2 роки тому

    Hallo.
    Sorry for the bother.
    how can i set up a repeat appointment?
    Imagine doing (also) a school timetable ...
    Thanks.
    @}-,-'---------
    Gianfranco

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому

      You could just have additional columns in your table indicating if it is repeating, the frequency of repeat, the total number or finish date, etc. The only date you need to keep is the start date.

    • @Abbici
      @Abbici 2 роки тому

      @@SteveGriffith-Prof3ssorSt3v3 So... I don't need another table, right?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому

      @@Abbici There are different ways of doing it but no, you don't have to create another table and create entries for all the repeats.

    • @Abbici
      @Abbici 2 роки тому +1

      Ok. I'll try. In the meantime, thank you very much!