date and time

Started by
0 comments, last by anekin 22 years, 1 month ago
I''m porting some VB code to VC but I''m stuck in a place. In VB, it exists a built-in function to extract the DAY from a variable of type Date. I want to know if possible to do the same in VC. For example, if the function receive as input ''12/21/2002'' or any combination, I want to extract the ''21'' from that variable. Any information it would be helpful for me
------------------------------I prefer to be the worst of the best than the best of the worst------------------------------
Advertisement
Like this:

  char *input = "12/21/2002";int date;sscanf(input,"%*d%*c%d",&date);  

?

This topic is closed to new replies.

Advertisement