Marcus

Marcus is a fullstack JS developer. He’s passionate about the hapi framework for Node.js and loves to build web apps and APIs. Creator of Futureflix and the “learn hapi” learning path.


MySQL — Get Weekday From Date

Storing and working with dates in the database is a common use case. You’re storing data and want to keep a reference of the creation date or when an update happens. MySQL comes with dozens of date and time functions. It facilitates your work when filtering or grouping rows …

Continue Reading

MySQL — Group Ranges Into Buckets

We’re working on a running project and want to calculate statistics. For example, how many 10k runs happened during the competition? Or how many half-marathons and marathons did people run? Runners in the event use Strava to track their activities. We’re using Strava webhooks to process and store …

Continue Reading

MySQL — Group by Date or Time

MySQL allows you to group data by certain attributes. Typically you’re grouping data when creating statistics. For example, you want to count the number of users made on a given day or within a selected month. This tutorial shows you how to group data in MySQL by date or …

Continue Reading

MySQL — Get the First Day of the Month

MySQL includes dozens of useful date and time functions. For example, you can retrieve the last day of a month using MySQL’s LAST_DAY function. But there’s no equivalent FIRST_DAY function. Yet, you can calculate the date of the first day of a month and this tutorial …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.