Linking subplot x-axes containing dates

It is recommended to provide a MWE as per guidelines.

The following seems to work:

using Dates, Plots; gr()

# create input data:
dtm1 =  Dates.datetime2epochms.(DateTime(2021,01,11,9,30):Minute(10):DateTime(2021,01,11,21,0))
waterdepth =  rand((1.57:0.1:2.1),length(dtm1))

dtm2 =  Dates.datetime2epochms.(DateTime(2021,01,11,9,30):Minute(10):DateTime(2021,01,12,9,3))
pressure =  rand((1007:0.5:1011),length(dtm2))

# process data:
dtmin, dtmax = minimum([dtm1[1];dtm2[1]]), maximum([dtm1[end];dtm2[end]])
dt_ticks = round.(Int64,LinRange(dtmin,dtmax,10))
str_ticks= Dates.format.(Dates.epochms2datetime.(dt_ticks),"dd-HH:MM")

# plot data:
pw = plot(dtm1,waterdepth, xrotation=60,label="water depth",c=:blue,lw=3,xticks=10)
Plots.plot!(xticks=(dt_ticks, str_ticks), ylims=(1.5,2.2))

pp = plot(dtm2,pressure, xrotation=60,label="baro pressure",c=:red,lw=3,xticks=10)
Plots.plot!(xticks=(dt_ticks, str_ticks), ylims=(1006,1015))

plot_merged = plot(pw,pp, layout=(2, 1), link=:x)
savefig("Synchronize_subplots_with_dates.png")

Synchronize_subplots_with_dates