You could say: "I've been trying to power up the laptop all day. But I haven't been able to do it since I don't know the code." (This means that you're still trying)
Otherwise, you must say, "I was trying to power up the laptop earlier ..."
Student or Learner