Re: dateformat



On Wed, Mar 09, 2005 at 09:10:32PM +0700, Hariyanto wrote:
> There is still problem because sometime I don't get date with same lenght string.
> I get 7/8/2005 or 12/12/2005 or 7/12/2005.

Why don't you simply use

  sscanf(datestring, "%d/%d/%d", &d, &m, &y);

?

> I get this date with this code :

Well, that may be the reason.  You can achieve the same with

  str_date = g_strdup_printf("%d/%d/%d", gday, gmonth+1, gyear);

Yeti


--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]