hi there.
let me explain about this.
first, in that case, you can use both of them for sure.
it's not that different meaning.
second, but nuance is little different.
it's really hard to understand for foreigners.
cuz, korean and english is totally different.
-을/를 is the objective postposition.
for example,
1. Look "at" me. 나를 봐.
2. he found a job "for" me. 그는 나에게 일을 구해줬다.
3. she hit him "on" the head 그녀는 그의 머리를 때렸다.
can you feel it?
4. you gave me a watch 너는 나에게 시계를 줬다.
5. I collect stamps 나는 우표를 수집한다.
but if you check sentences of -에, you'll be confused.
basically, -에 is the postposition for cases.
but it can't be translated by english.
for example
1. "at" seven 일곱시에
2. "on" my birthday 내 생일에
3. I was born "in" 1987 나는 1987년에 태어났다.
4. I got married last May 나는 작년 5월에 결혼했다.
similar to -을/를. right?
you you'd better keep study, and get to feel nuance.
p.s
in my case, I'm korean who study english.
as I studied "for", "to, "as", I was pretty confused.
cuz these can be expressed for many nuances.
but I think, native speakers could say "bcuz... it's just bcuz." to me.
they know nuance.
and now, I can get to know "as, for, to"s nuance.
you'll also get to know about nuance as you study hard.