"konnichiwa" is the greeting at the daytime. like a say "hello".
yes, both is the correct.. but we usually use hiragana, when write that word..こんにちは
because, "今日は" has the other reading.. its "kyou wa".. its meaning.. "today"..
so when you write the greeting, "ohayou" "konnichiwa" "konbanwa" at that time..
just use hiragana..おはよう こんにちは こんばんは like that...