GREENBURGH, N.Y. — Nearing the halfway point of the NHL season, there’s a line being drawn in the sand for the Rangers.

With their 40th game of the season Tuesday night against the Dallas Stars, the Blueshirts are 21-14-4, but only 5-11-2 in the last 18 games after a 16-3-2 start.

“Our best hockey has got to come here,” coach Alain Vig neault said, “because all you have to do is look at the standings to know it’s going to be very spirited and competitive every night.”

In other words, as Yogi Berra once said, “It gets late early.”

In the previous two seasons, Vigneault relied on a speedy team backed by excellent goaltending — primarily from Henrik Lundqvist but also Cam Talbot — to keep them from downturns when the offense falters and the defense cracks.

“We need Hank to re-become the Hank that he’s used to, for us, and from there, I think everything else should fall into place,” Vigneault said. “No doubt we have a few players playing subpar.”

After practice Monday, Ryan McDonagh acknowledged that the time for a push is now.

advertisement | advertise on newsday

“We’re still kind of middling up and down and it’s going to get us nowhere fast unless we find some consistency, find that motivation to work as hard as you can on the ice to win one hockey game,” he said. “There’s teams all around us who are improving. It’s getting to that time of year where the penalty kill and power plays are getting better. We have to continue to elevate our game.”

Vigneault conceded that when the Rangers got off to their hot start, “it was a huge plus, results-wise, but I don’t think we were playing as well as this group can.” In the last few games, he said: “I have seen some signs of us steering in the right direction. Our chance-against totals are down, we’re playing more physical, we’re generating more pucks and attention toward the other team’s net, our power play has been a good weapon. We’ve got to put it together.”

A stretch of points would do wonders for the psyche and the standings.

“It’s not the same confidence we had after 10 games into the season when everything was going our way,” Lundqvist said. “To get to that good place again, we have to work extremely hard and earn the good bounces.”

Notes & quotes: Former Penguin Jayson Megna (7-11-18 in 34 games in Hartford) was recalled and presumably will step in for Chris Kreider (cut hand), whom Vigneault said is doubtful for Tuesday night. Emerson Etem skated in Kreider’s spot Monday, but Etem’s play led to two Panthers goals in a 3-0 loss. He made a poor centering pass late in the first period and also took a penalty to set up a power-play goal by Florida . . . Kevin Hayes, a healthy scratch for two games, is likely to return on the third line.