[erlang-questions] Print Date
Wed Nov 14 23:25:41 CET 2012
On 15/11/2012, at 5:06 AM, Lucky wrote:
> Hi Erlang Developers'
> I'm stuck here, I am trying to print date which is in this format "2012/04/23" using io:format/2, but I want it to be printed like this: 2012/04/23 without invited commas, how do I go about resolving this?
READ THE MANUAL!
Ask yourself, "how did those quotation marks get there? What did I to that
made io:format/2 think I was ASKING for them?"
It looks to me as though you used ~p when you meant ~s,
and in particular it looks to me as though you very likely
just want to do
and not involve io:format/2 at all. (Like in C you'd use fputs() rather
1> io:format(standard_io, "~p~n", ["2012/04/23"]).
2> io:format(standard_io, "~s~n", ["2012/04/23"]).
3> io:put_chars(standard_io, "2012/04/23"), io:nl(standard_io).
Before posting one more question, PLEASE try reading the manual.
More information about the erlang-questions