Date in SQL Server

D

Drew

I have a report that displays an Employee's information. The database has
the following fields,

EmpID,
EmpFName,
EmpLName,
EmpMName,
PosID,
EmpAddress,
EmpStartDate,
EmpSepDate

The problem I am having is that the EmpStartDate and EmpSepDate have the
following data,

1900-01-01 00:00:00.000

On the report, it shows as 12:00:00AM. I need to only show the date only if
it isn't as above. I have tried the following,

=IIf([EmpSepDate]="1900-01-01 00:00:00.000","",[EmpSepDate])

Thanks,
Drew
 
P

Pieter Wijnen

I'd update all default dates to NULL which offcourse needs to be taken into
consideration when running queries

HTH

Pieter
 
Ë

ËÎ

Drew said:
I have a report that displays an Employee's information. The database has
the following fields,

EmpID,
EmpFName,
EmpLName,
EmpMName,
PosID,
EmpAddress,
EmpStartDate,
EmpSepDate

The problem I am having is that the EmpStartDate and EmpSepDate have the
following data,

1900-01-01 00:00:00.000

On the report, it shows as 12:00:00AM. I need to only show the date only if
it isn't as above. I have tried the following,

=IIf([EmpSepDate]="1900-01-01 00:00:00.000","",[EmpSepDate])

Thanks,
Drew
 
Ë

ËÎ

Drew said:
I have a report that displays an Employee's information. The database has
the following fields,

EmpID,
EmpFName,
EmpLName,
EmpMName,
PosID,
EmpAddress,
EmpStartDate,
EmpSepDate

The problem I am having is that the EmpStartDate and EmpSepDate have the
following data,

1900-01-01 00:00:00.000

On the report, it shows as 12:00:00AM. I need to only show the date only if
it isn't as above. I have tried the following,

=IIf([EmpSepDate]="1900-01-01 00:00:00.000","",[EmpSepDate])

Thanks,
Drew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top