CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Before Update Event

Print topic Send  topic

Author Message
Sebastian
Posted: 09/30/2002, 10:05 AM

Hello

I have big problems with some Before Update Event. I have a field called $flddatum. i let a javascript write some date in it (the tigra applet) with the format 18,45,14,9,19,2002. Now i want to make a Unix timestamp for this date, so i go on and put at the Before Update Event this little piece of code:

$flddatum = mktime($flddatum);

but i become the timestamp for the actual date and not the date given in the $flddatum variable. When i use $flddatum = mktime(18,45,14,9,19,2002); directly in the Before Update Event, all works fine.

Whats the problem or my failure ?
Nicole
Posted: 10/02/2002, 11:38 PM

Sebastian,
in case the value of $flddatum is the one that was created with JS function, the mktime() won't accept it. Look at mktime() function description in PHP manual:
int mktime (int hour, int minute, int second, int month, int day, int year [, int is_dst])

all parameters are of int type. While $flddatum is one variable of string type.
You should split the string into separate int variables, then use them in mktime(). Use e.g. PHP split() function for it. Here is its description:
http://www.php.net/manual/en/function.split.php


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.