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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a datetime parameter without the AM/PM

Status
Not open for further replies.

skurkal

IS-IT--Management
Apr 6, 2005
37
US
I need help with a formula which calulates a date and time and passes it as a parameter to a subreport which uses that datetime parameter to execute a stored proc.

The formula is DateTime(CurrentDate, Time(06,30,00)). This gives the result with a AM attached to it which causes the subreport to not show any result. How can I remove the AM suffix? The time has to be 6:30:00.
 
Are you stating that you want PM or?

Times are passed as 24 hour, so 06:30 is AM, 18:30 is PM.

If you want PM, use the appropriate time.

-k
 
I do not want either AM or PM. Using the formula

DateTime(CurrentDate, Time(06,30,00)) gives me the result
9/16/2005 6:30:00AM. But I want it to show up as 9/16/2005 6:30:00 only, no AM or PM. And the value should still be in a datetime format as the storedproc accepts only a datetime value and not a text.
 
There isn't a 6:30 time, AM/PM qualifies it.

If you want to change the returned display value just right click the datetime field and select format field->date time and remove the AM/PM.

You might alter the stored procedure to remove the times, from the passed value or whatever, but I think that you wither misunderstand how Crystal works, or datetime fields.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top