|
-
September 2nd, 2011, 07:05 AM
#1
display date using format ?
i want to display date in a text box which is in a flex grid
Code:
Estval = bookval.EstimatedLife 'here value in Estval = 700
Estval = Estval / 100 'here value in Estval = 7
MainBookFlexGrid(1).col = col
MainBookFlexGrid(1).Row = 5
MainBookFlexGrid(1).Text = Format(Estval, "00 yrs 00 mos") 'here it becomes 00 yrs 07 mos
MainBookFlexGrid(1).Text = Format(Estval, "00 yrs 00 mos")--->this displays 00 yrs 07 mos instead of 07 yrs 00 mos
where am i going wrong?
plz help..
Last edited by dskp; September 2nd, 2011 at 07:11 AM.
-
September 2nd, 2011, 07:32 AM
#2
Re: display date using format ?
Seems like the format you are using basically splits the value such that the "mos" get the two right-most digits, and the "yrs" get everything to the left of that. So a value of 100 yields 01 yrs and 00 mos. A value of 700 would therefore give you "07 yrs 00 mos".
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
September 2nd, 2011, 03:50 PM
#3
Re: display date using format ?
Your format construction is wrong.
You have to know what the unit of Estval is in order to write a proper format instruction.
What does the 700 signify? Days? Months?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|