La date sous Unix

La date sous Unix - Programmation

Marsh Posté le 27-02-2001 à 09:34:00    

Sous Unix la commande date renvoie la date courante mais par défaut le mois est formaté en 3 caractères (exemple Feb pour février) Comment puis je faire pour récupérer le mois sous forme d'entier ?
 
Merci


---------------
"There's not such a thing as a stupid question, only stupid people..."
Reply

Marsh Posté le 27-02-2001 à 09:34:00   

Reply

Marsh Posté le 27-02-2001 à 09:34:43    

man date

Reply

Marsh Posté le 27-02-2001 à 09:36:07    

deja fait ca jy comprends rien  :gun:


---------------
"There's not such a thing as a stupid question, only stupid people..."
Reply

Marsh Posté le 27-02-2001 à 09:47:18    

Euh, AirBg tu suis quoi comme cursus ?
 
Il y a marqué (man SUN) : "+ format"
puis un exemple "date '+DATE: %m/%d...."
 
Donc un petit date '+%m' te renvoie 02.


---------------
"If you can walk away from a landing, it's a good landing. If you use the airplane the next day, it's an outstanding landing." - Chuck Yeager. | Chaîne YT | Photos
Reply

Marsh Posté le 27-02-2001 à 09:50:44    

Merci mais j'avais trouvé (c'est sous HP-UX mais c'est pareil) :D  
 
Pour ton info de mon cursus : je suis en licence miage apres avoir fait un DUT. J'ai posé ma question sur ce forum car j'ai la flemme de lire les manuels en anglais...


---------------
"There's not such a thing as a stupid question, only stupid people..."
Reply

Marsh Posté le 27-02-2001 à 10:20:33    

j'ai la flemme de lire les manuels en anglais...
 
Bon courage dans ta vie professionnelle alors.


---------------
"If you can walk away from a landing, it's a good landing. If you use the airplane the next day, it's an outstanding landing." - Chuck Yeager. | Chaîne YT | Photos
Reply

Marsh Posté le 27-02-2001 à 10:23:50    

T'en fais pas je bosse Hewlett Packard en tant qu'apprenti :)
 
et les langues ne sont pas un probleme (quand j'ai pas la flemme  :D )
 
A+ et merci


---------------
"There's not such a thing as a stupid question, only stupid people..."
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed