Exercise

DECLARE & CAST

Let's use DECLARE() and CAST() to combine a date variable and a time variable into a datetime variable.

Instructions

100 XP
  • Create a time variable named @ShiftStartTime and set initial value to '08:00 AM'.
  • Create a date variable named @StartDate and set it to the first StartDate from the BikeShare table.
  • Create a datetime variable named `@ShiftStartDateTime.
  • Change @StartDate and @ShiftStartTime to datetime data types and assign to @ShiftStartDateTime.