Bonjour,
Je dispose d’une BD avec deux colonnes : entrée et sortie.
Ces colonnes sont des dates mais sont au mauvais format.
Par exemple la cellule 14,45 correspond à 14h45.
J’ai essayé en modifiant le format de la colonne en disant qu’en entrée il s’agissait de format numérique et en sortie je voudrais « h:m » comme ci dessous :
cela ne fonctionne pas, avez-vous une idée pour résoudre ce problème SVP ?
Merci pour vos réponses !
The issue is that time in JMP is categorized as seconds. 14.45 is not in seconds, so you need to convert your numbers into seconds.
There is likely a more economical way to do this formula, but this one shows exactly what is going on.
The first part (before the + sign) takes the integer portion and converts to seconds. The second part will find the fraction of the entry, multiply by 100 to convert to an integer, divide by 60 to convert to a fraction of an hour. Then, the "In Hours" function will convert that to seconds.
To add to @Dan_Obermiller response, the below script will make the changes-in-place for the entrée column;
Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
:entrée = In Hours( Floor( :entrée ) )
+In Hours(
Modulo( :entrée, Floor( :entrée ) ) * (100
/ 60)
)
);
:entrée << Format( "h:m" );
The issue is that time in JMP is categorized as seconds. 14.45 is not in seconds, so you need to convert your numbers into seconds.
There is likely a more economical way to do this formula, but this one shows exactly what is going on.
The first part (before the + sign) takes the integer portion and converts to seconds. The second part will find the fraction of the entry, multiply by 100 to convert to an integer, divide by 60 to convert to a fraction of an hour. Then, the "In Hours" function will convert that to seconds.
To add to @Dan_Obermiller response, the below script will make the changes-in-place for the entrée column;
Names Default To Here( 1 );
dt = Current Data Table();
For Each Row(
:entrée = In Hours( Floor( :entrée ) )
+In Hours(
Modulo( :entrée, Floor( :entrée ) ) * (100
/ 60)
)
);
:entrée << Format( "h:m" );
merci pour vos réponses !