Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting number to date

Status
Not open for further replies.

SergeS

MIS
Aug 14, 2002
28
0
0
Hi all,

I am prompting a user to enter a year, f.e. 2002 (specified as number I guess).

After that I want to select data from the database using something like: is valid on 31/12/entered year in this example 31/12/2002.

How can I transform the entered year to the date 31/12/entered year?

Thanks in advance,

Serge
 
Hello Serge,

sounds like the ever reappearing demand for: 'dependant' or 'cascading' prompts you are after.
Look at the whole of thread:


thread393-335185 T. Blom
Information analist
Shimano Europe
tbl@shimano-eu.com
 
Thanks blom,

however I found the following solution:

I created an object in my universe stating: convert(datetime, '12/31/' + @Prompt('Enter reference year','A',,MONO,FREE)) (I am using Sybase Adaptive Server)

when I need to compare dates I can use the @Select(object) in my condition.

Cheers, Serge
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top