Results 1 to 2 of 2

Thread: Time Format - **RESOLVED**

  1. #1
    Addicted Member
    Join Date
    Sep 00
    Location
    UK
    Posts
    199

    Unhappy Time Format - **RESOLVED**

    This has solved the problem - Thankyou.

    It was my mistake - I am using the masked edit control in VB to enter a time. This does not keep the colons in the string hence 23:00:00 becomes 230000 when passed into Crystal.

    Thankyou once again.



    Hi All.

    This is the code I am using to pass values from VB into a parameter field in Crystal Reports


    Report.ParameterFields.Item(1).AddCurrentValue = CDate("27/05/02")

    The CDate formatting works but how do you pass a time into Crystal, for example......

    Report.ParameterFields.Item(1).AddCurrentValue = "23:00:00"


    This results in a Type Mismatch error. What datatype would I need to use??

    Help!!!
    Last edited by PaulTilley; Oct 31st, 2002 at 02:18 PM.

  2. #2
    Frenzied Member pnish's Avatar
    Join Date
    Aug 02
    Location
    Tassie, Oz
    Posts
    1,915
    I'm pretty sure you can still use the CDate function, eg
    VB Code:
    1. Report.ParameterFields.Item(1).AddCurrentValue = CDate("23:00:00")
    After all, dates & times are the same datatype, ie DateTime.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •