zanza67
6th November 2009, 16:45
Hi there
i have a variable defined as tcdate
in the form the format show just the date not time
but i use this variable to do a select where the index is a tcdate field that contain also minutes
so i need to select for example 01-01-2009:00:00:00 to 31-01-2009:23:59:59
do you know how to set the minutes in my variable that show just date 01-01-2009 and 31-01-2009?
regards
rberti
6th November 2009, 17:30
there is more than one ways. One is using local.to.utc (long local_days, long local_time, ref long utc [, string local_dst])
You can set the time you want to the ref. variable.
Maybe you'll need to use long utc.to.local (long utc, ref long local_days, ref long local_time, ref long local_dst) first.
Hope it helps.
Rafael
zanza67
6th November 2009, 17:46
Hi Rafael
basically i already have the value of the date, i need to fill just the value of the time so i need a function that set just time leaving as is the date value
regards
rberti
6th November 2009, 20:55
Hi,
So, then you can use utc.to.local(): You'll pass as first parameter the date field. as reference, you'll have the number of days and the number of seconds (second and third parameters). Then you can call local.to.utc(), passing the number of days that you got, and the number of seconds you want (I guess it will be 1 for the "from" date field).
Then, you will have as reference the same date, changing only the time.
Take a look at what help says about these functions.
Regards!
saumya
9th November 2009, 08:14
Use domain tctime.
zanza67
9th November 2009, 11:46
Use domain tctime.
for what???
solution of rberti should be ok
thanks