Hi
FinalDuration field datatype is datetime in access database. In table few rows are blank without data. I am using the below formula to calculate the field value.
Hour(DownloadTourMaster.FinalDuration) * 3600 + Minute(DownloadTourMaster.FinalDuration) * 60+ Second(DownloadTourMaster.FinalDuration)
but in database table few rows are blank without data. so its displaying the runtime error
Null referenece as Object reference not set to an instance of an object.
So I need to write a check condition so that if field is blank , its not calculate the field value.
Please help me.
Thanks
Vikas
check datetime field null value or blank value
check datetime field null value or blank value
- Attachments
-
- 558.SampleList.mrt
- (76.29 KiB) Downloaded 371 times
check datetime field null value or blank value
Hello,
Can you please send us a sample report with data, which reproduces the issue?
Thank you.
Can you please send us a sample report with data, which reproduces the issue?
Thank you.
check datetime field null value or blank value
Hi Ivan
Issue is that if in database table are missing few records in finalduration column then runtime error is coming.
I want to check that if row does bot have the data in particular row , in that case its not show thw error. So i need to implement a IF condition.
Please see the attachment throuigh my first post.
Please suggest
Thanks
Vikas
Issue is that if in database table are missing few records in finalduration column then runtime error is coming.
I want to check that if row does bot have the data in particular row , in that case its not show thw error. So i need to implement a IF condition.
Please see the attachment throuigh my first post.
Please suggest
Thanks
Vikas
check datetime field null value or blank value
Hello,
Use the following code:
Use the following code:
Thank you.Hour(DownloadTourMaster.FinalDuration.GetValueOrDefault()) * 3600 + Minute(DownloadTourMaster.FinalDuration.GetValueOrDefault()) * 60+ Second(DownloadTourMaster.FinalDuration.GetValueOrDefault())