Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers. Posting code with all required library statements, and especially representative data objects, to allow cut-and-paste removes a lot of friction from having to reverse engineer the problem, even when it's relatively straightforward such as this.
For POSIXct try with scale_x_datetime() and as.POSIXct() instead of scale_x_date() and as.Date(). If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.