PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Sorting the date time column of a table in Android
Sorting the date time column of a table in Android
Started by Jim, Mar., 06 2019 4:00 PM - 5 replies
Connect yourself…
Jim
#1
Posted on March, 06 2019 - 4:00 PM
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
Report
0
0
Jim
#2
Posted on March, 06 2019 - 7:26 PM
Looks like I found my own answer.
The input mask had to be set to the same thing as the display mask.
Thanks
Jim
Report
0
0
ARV
#3
Registered member
498 messages
Popularité : +8 (8 votes)
Posted on March, 06 2019 - 10:24 PM
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
Report
0
0
Jim
#4
Posted on March, 07 2019 - 4:27 PM
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
Report
0
0
ARV
#5
Registered member
498 messages
Popularité : +8 (8 votes)
Posted on March, 08 2019 - 2:41 PM
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
Report
0
0
ARV
#6
Registered member
498 messages
Popularité : +8 (8 votes)
Posted on March, 08 2019 - 10:05 PM
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
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text