PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → How do you get the DateTime ?
How do you get the DateTime ?
Débuté par Joel, 18 sep. 2008 01:51 - 1 réponse
Posté le 18 septembre 2008 - 01:51
On each record I create, I have a field called "Created". In the analysis it is set up as a "Date Type" and a sub-type of "Date and Time". I'm trying to get the "Date and Time" in there, but can't figure out how. There is no DateTime() Function. My code is as follows:

PROCEDURE Pr_UpdateCreatedOrModified()
SWITCH H.TriggerFunction
CASE "HAdd"
{H.FileName+".Created"} = Today()


{H.FileName+".Modified"} = Today()
CASE "HModify"
{H.FileName+".Modified"} = Today()
END

I know the Today() function is wrong (and it is storing nothing in the field) but I can't figure out what to use.

Thank you!
Posté le 19 septembre 2008 - 00:35
Hi Joel,

Try
{H.FileName+".Created"} = DateSys() + TimeSys()

Christian

Joel a écrit dans le message de news <bc7eea88014efb2342dbc8d94446abf3@news.pcsoft> :
On each record I create, I have a field called "Created". In the analysis it is set up as a "Date Type" and a sub-type of "Date and Time". I'm trying to get the "Date and Time" in there, but can't figure out how. There is no DateTime() Function. My code is as follows:

PROCEDURE Pr_UpdateCreatedOrModified()
SWITCH H.TriggerFunction
CASE "HAdd"
{H.FileName+".Created"} = Today()


{H.FileName+".Modified"} = Today()
CASE "HModify"
{H.FileName+".Modified"} = Today()
END

I know the Today() function is wrong (and it is storing nothing in the field) but I can't figure out what to use.

Thank you!