FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
Sorting the date time column of a table in Android
Sorting the date time column of a table in Android
Débuté par Jim, 06 mar. 2019 16:00 - 5 réponses
Connectez-vous…
Jim
#1
Posté le 06 mars 2019 - 16:00
In the emulator it works great.
The mask in the table column seems to take care of it.
The mask is MM/DD/YYYY HH:mm AM
On an actual phone the date time will show up as
02/26/2019 22:17 PM instead of 02/26/2019 10:17 PM like it does in the emulator.
What is being put in the string is a DateTime variable.
This is what actually is in the table column. 20190226221700222
I previously had it all as text, but
could not sort due to the AM PM being in there.
The phone basically stays in military time format and is ignoring the AM/PM.
A morning time still says PM.
Anyone have a good workaround for this?
Thanks
Jim
Signaler
0
0
Jim
#2
Posté le 06 mars 2019 - 19:26
Looks like I found my own answer.
The input mask had to be set to the same thing as the display mask.
Thanks
Jim
Signaler
0
0
ARV
#3
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 06 mars 2019 - 22:24
Hi
What plataform are you using?
On Android I want to show something like 1:00 P.M.
but the device only but me 13:00
I put on the mask the DDMMYY AP
and it doesn't work.
Cant you tell me what did you put on your display mask?
Thanks and I'm glad you find your answer.
--
Best Regards
ARV
Signaler
0
0
Jim
#4
Posté le 07 mars 2019 - 16:27
ARV,
I struggled with that too until I changed the Input Mask. I had Date Defined by Project.
Android. WDM 23.
Input Format is Date
Both the input mask and display mask are below:
MM/DD/YYYY HH:mm AM
MM/DD/YYYY HH:mm AM
Returned Value is:
YYYYMMDDHHmmSS
What is in my table cell is a variable of DateTime type.
20190226221700222
Jim
Signaler
0
0
ARV
#5
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 08 mars 2019 - 14:41
Hi Jim
Thanks for your reply
I will test all you write and let you know if it works or not
Thanks again!
--
Best Regards
ARV
Signaler
0
0
ARV
#6
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 08 mars 2019 - 22:05
Hi Jim
Dude! you are a genius!
It work!
I will now post this solution on one of my threads back in the day also I will put the source too
thanks Jim this will be a big help for everyone who use Android on Windev and on iOS too!
important things:
if it is a table then use what Jim said
if it is a Edit it's the same as a table
if it is a static then only need to change it on display mode.
NOTE: Do not change the returned value
thanks again Jim!
--
Best Regards
ARV
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte