Gossamer Forum
Home : Products : DBMan : Customization :

Re: Time (Invalid date format)

Quote Reply
Re: Time (Invalid date format) In reply to
The problem is with the following codes:

Code:

my ($mon, $day, $year, $time, $ampm) = split(/ /, $date);
my ($hour, $min, $sec) = split(/:/, $time);


You are splitting values twice, which I believe is the source of your problem.

Here are some suggestions:

1) Use the default sub get_date codes for printing the date in the database. Then use a conversion sub-routine to print the date and time in your web pages.

2) Use a hidden field in your sub html_record_form routine like the following:

Code:

<input type="hidden" name="Time" value="$rec{'Time'}">


BTW: You do NOT need single quotation marks for field names that contain only one word. Single quotation marks are only used for field names with more than one word.

Example:

Code:

Read_FAQ


OR

Code:

'Visit Resource Center'


Regards,

Eliot

Subject Author Views Date
Thread Time (Invalid date format) ogrady 1345 Jul 21, 2000, 2:58 PM
Thread Re: Time (Invalid date format)
Stealth 1282 Jul 22, 2000, 11:24 AM
Thread Re: Time (Invalid date format)
ogrady 1259 Jul 24, 2000, 9:21 AM
Post Re: Time (Invalid date format)
Stealth 1255 Jul 24, 2000, 9:37 AM