Submitted by Armando on 2009/12/14 14:07
I have this function :
 
Function AddALLKeyword(Fi, keyw)
  dim myFi
  myFi=trim(Fi & "")
    myFi=MyFi & " " & keyw
  AddALLKeyword=myFi
End Function
 
I used it to print some dates from some dates fields (e.g. : duedates, sentdates) to other text field.
Dates used to be printed in the text fields without any problem... but now , I get an integer.... Like  : 40160
 
 
Here's an example of an autoassign in the duedate field making use of the above mentioned function.
 
AM:DueDatesAllPast=addALLKeyword(DueDatesAllPast, DueDate)
 
 
So... Before, I used to to have a series of date appearing in the field DueDatesAllPast when I changed dates in the due datefield.
In the DueDatesAllPast field I'd get Something like :
 
2009-12-10  2009-12-12 2009-12-13.
 
But now I rather have :
 
40160 40162 40163
 
 
Of course, this is important to me as this is how I keep track of tasks and projects...
 
[Edited -- previous version was incomprehensible...]

Comments

Dates are now passed in their native format (which is a floating point double) to allow easy date operations. If you want your function to get strings, you must convert your date to a string first (or modify your function to do that for you). Format and FormatDateTime can both do that for you.
 

Armando

2009/12/15 11:47

In reply to by Pierre_Admin

Thanks. Not sure of how to use the Format and FormatDateTime functions but will try...

Armando

2009/12/15 13:56

In reply to by Pierre_Admin

Hi Pierre,
 could you give more precisions on how and where to use "format" or "FormatDateTime" ? Thanks.

Armando

2009/12/15 19:05

In reply to by Armando

Ok, I had problems with format (function not supported ?) but formatdatetime  seems promising.... ;)