PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → date-time field
date-time field
Iniciado por Patrick Thijs, fev., 09 2004 8:32 PM - 2 respostas
Publicado em fevereiro, 09 2004 - 8:32 PM
I'm trying to write the current date and time into a date-time field in a hyperfile database.
i'm doing it this way : StaticScreens.StaticCreated = DateSys + TimeSys
This way, the date is correctly displayed, but the time is wrong
I've tried all other possible way's but I can't get it right, what am I doing wrong ?
Greetz
Patrick

THSP
Publicado em fevereiro, 10 2004 - 1:56 AM
Hi Patrick,
Pls check out the followings:
Steps
1. Load Analysis
2. selected item must be of type Date
3. Right under the General tab of the selected item was defaulted as "Date(yyyymmdd)"
4. change the format of 3 into "Date and time"
Regs,
King
I'm trying to write the current date and time into a date-time field in a hyperfile database.
i'm doing it this way : StaticScreens.StaticCreated = DateSys + TimeSys
This way, the date is correctly displayed, but the time is wrong
I've tried all other possible way's but I can't get it right, what am I doing wrong ?
Greetz
Patrick
Publicado em fevereiro, 10 2004 - 9:40 AM
Hi Patrick,
The time functions are not quite adequate in Windev. I had similar kinds of problems trying to fill a time control from a string containing a "valid" time, such as "20:30". I only got the hours right, but not the minutes, no matter what I tried. There is no stringtotime function in Windev, so you have to do it yourself. Extract the hours and minutes into separate string variables and then combine the results of their stringtonum functions, like this:
TimeDisplayString = NumToString(hours)+":"+NumToString(minutes,"02d")
See also Günther's message
http://f16.parsimony.net/forum28986/messages/11232.htm
- that's where I got the solution.
Best regards
Ola Pedersen

I'm trying to write the current date and time into a date-time field in a hyperfile database.
i'm doing it this way : StaticScreens.StaticCreated = DateSys + TimeSys
This way, the date is correctly displayed, but the time is wrong
I've tried all other possible way's but I can't get it right, what am I doing wrong ?
Greetz
Patrick



Pienoismalli Magazine