Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Recherche code module transformation date

4 réponses
Avatar
Anthony MUSCAT
Bonjour,

J'ai un champ date que je saisis dans une table au format JJ/MM/AAAA (ex :
18/07/2007), que je dois exporter au format suivant AAAAMMJJ (ex : 20070718).

Quelqu'un peut-il me fournir ça ? car je ne maîtrise pas le VBA.

Merci d'avance.

Anthony MUSCAT.

4 réponses

Avatar
Thierry (ze Titi)
Bonjour Anthony MUSCAT

La fonction Format sert à ça.
Dans une requête par exemple:

SELECT Format([tonChampsDate];"aaaammjj") As laDateFormattee
FROM taTable

En VBA, c'est pareil sauf que le point-virgule est transformé en
virgule.
uneVariable=Format(leChamps,"aaaammjj")

Si tu as l'intention d'installer ton application un peu partout dans le
monde, utilise les initiales en anglais:

uneVariable=Format(leChamps,"yyyymmdd")

Voilou !

Dans ton message
Bonjour,

J'ai un champ date que je saisis dans une table au format JJ/MM/AAAA (ex :
18/07/2007), que je dois exporter au format suivant AAAAMMJJ (ex : 20070718).

Quelqu'un peut-il me fournir ça ? car je ne maîtrise pas le VBA.

Merci d'avance.

Anthony MUSCAT.


--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info

Avatar
Anthony MUSCAT
Cela ne marche pas ???

Champs date : ROLDAT_AS (table Paramètres_AS)
Champs formaté destinataire : ROLDAT (table Transfert_Role).

merci.

-----------------------


Bonjour Anthony MUSCAT

La fonction Format sert à ça.
Dans une requête par exemple:

SELECT Format([tonChampsDate];"aaaammjj") As laDateFormattee
FROM taTable

En VBA, c'est pareil sauf que le point-virgule est transformé en
virgule.
uneVariable=Format(leChamps,"aaaammjj")

Si tu as l'intention d'installer ton application un peu partout dans le
monde, utilise les initiales en anglais:

uneVariable=Format(leChamps,"yyyymmdd")

Voilou !

Dans ton message
Bonjour,

J'ai un champ date que je saisis dans une table au format JJ/MM/AAAA (ex :
18/07/2007), que je dois exporter au format suivant AAAAMMJJ (ex : 20070718).

Quelqu'un peut-il me fournir ça ? car je ne maîtrise pas le VBA.

Merci d'avance.

Anthony MUSCAT.


--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info






Avatar
Thierry (ze Titi)
destinataire=Format(leChamp,"yyyymmdd")

Dans ton message
Cela ne marche pas ???

Champs date : ROLDAT_AS (table Paramètres_AS)
Champs formaté destinataire : ROLDAT (table Transfert_Role).

merci.

-----------------------


Bonjour Anthony MUSCAT

La fonction Format sert à ça.
Dans une requête par exemple:

SELECT Format([tonChampsDate];"aaaammjj") As laDateFormattee
FROM taTable

En VBA, c'est pareil sauf que le point-virgule est transformé en
virgule.
uneVariable=Format(leChamps,"aaaammjj")

Si tu as l'intention d'installer ton application un peu partout dans le
monde, utilise les initiales en anglais:

uneVariable=Format(leChamps,"yyyymmdd")

Voilou !

Dans ton message
Bonjour,

J'ai un champ date que je saisis dans une table au format JJ/MM/AAAA (ex :
18/07/2007), que je dois exporter au format suivant AAAAMMJJ (ex :
20070718).

Quelqu'un peut-il me fournir ça ? car je ne maîtrise pas le VBA.

Merci d'avance.

Anthony MUSCAT.


--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info






--
Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info



Avatar
Fabien
Bonjour
Quant tu écris 'ça marche pas' , qu'est ce qui ne marche pas ?

as tu essayé
INSERT INTO Transfert_Role ( ROLDAT )
SELECT format([Paramètres_AS].[ROLDAT_AS],"yyyymmdd")
FROM [Paramètres_AS];
?
Mais ça c'est une requete d'ajout. Si c'est un transfert des données de
la table Parametre_as vers Transfert_Role ça doit être ok

ps : j'ai supposé que Roldat_as et roldat sont de type date

Cela ne marche pas ???

Champs date : ROLDAT_AS (table Paramètres_AS)
Champs formaté destinataire : ROLDAT (table Transfert_Role).

merci.

-----------------------


Bonjour Anthony MUSCAT

La fonction Format sert à ça.
Dans une requête par exemple:

SELECT Format([tonChampsDate];"aaaammjj") As laDateFormattee
FROM taTable

En VBA, c'est pareil sauf que le point-virgule est transformé en
virgule.
uneVariable=Format(leChamps,"aaaammjj")

Si tu as l'intention d'installer ton application un peu partout dans le
monde, utilise les initiales en anglais:

uneVariable=Format(leChamps,"yyyymmdd")

Voilou !

Dans ton message
Bonjour,

J'ai un champ date que je saisis dans une table au format JJ/MM/AAAA (ex :
18/07/2007), que je dois exporter au format suivant AAAAMMJJ (ex : 20070718).

Quelqu'un peut-il me fournir ça ? car je ne maîtrise pas le VBA.

Merci d'avance.

Anthony MUSCAT.
--

Cordialement,
Thierry

Tout pour réussir avec Access :
http://www.mpfa.info