Hi,
anyone know of a function already written in C, that accepts a char *, returns a char * and does the following
input similar to 20030908.00
output required 08092003 [i.e., ddmmyyyy]
tia,
Hi,
anyone know of a function already written in C, that accepts a char *, returns a char * and does the following
input similar to 20030908.00
output required 08092003 [i.e., ddmmyyyy]
tia,
Why not write your own? It's trivial.
It is not the spoon that bends, it is you who bends around the spoon.
um thanks
Try this.
Code:#include <stdio.h> #include <string.h> int main(void) { char a[20] = "20030908.00"; char b[20] = ""; strncpy( b,a+6,2 ); strncat( b,a+4,2 ); strncat( b,a,4 ); printf( "%s\n",b ); return 0; }
ty swoopy