Jump to content
Bruno Carvalho

comparação de datas

Recommended Posts

Bruno Carvalho

Boas noites, tenho um pequeno problema num projeto que estou a desenvolver

como faço para comparar e atualizar esta data que criei com outra mais atual usando a mesma sintaxe em âmbas

experimentei usando o strcmp mas n funcionou

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc, char** argv) {

    char dateStr[9];
    _strdate( dateStr);
    printf( "The current date is %s \n", dateStr);
    return (EXIT_SUCCESS);
}

obrigado!!!

Share this post


Link to post
Share on other sites
pwseo

@Bruno Carvalho,

Tens que ser mais específico: o que queres dizer com «comparar e atualizar»? Consegues dar um exemplo de como funcionaria o teu programa?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.