×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

HELP!!! Passing a Date from a HTML Text field into WF

HELP!!! Passing a Date from a HTML Text field into WF

HELP!!! Passing a Date from a HTML Text field into WF

(OP)
I have a HTML Page with a Text field containing a date e.g.
30/05/2003.

This date field is to be used as a &DATEFROM variable. My problem is when it gets passed into Webfocus and is compared to the field of dates, the &DATEFROM field is recognised in A10 format or similar, however the date field is in the format HMDYY format.  

Here is the code that I am using currenlty...

PRINT
     ALLDATES
WHERE ( ALLDATES GE '&DATEFROM');

Cheers

Matthew Paba

RE: HELP!!! Passing a Date from a HTML Text field into WF

Hi Matthew,

HTML field values are always passed on to webfocus as a string. So you'll have to convert the string format to Date format.

Regards
Eva

RE: HELP!!! Passing a Date from a HTML Text field into WF

(OP)
Hi Eva,

I had pretty much given up hope of passing through a date value. Thanks for your kind reply, you're a star.

Cheers

Matthew

RE: HELP!!! Passing a Date from a HTML Text field into WF

Matthew,

Actually, you have TWO problems. The first is, you've specified your field's date format as MDYY, but the value you pass in is DMYY. So, the order of the components is different.

Second, when testing on a literal for a 'H' format field, you must use the DT function, to indicate that the value is a date-time constant. Thus, the test should look like this:

WHERE (ALLDATES GE DT(&DATEFROM))

This assumes that &DATEFROM is in a MDYY format, matching the format of ALLDATES.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close