Date Convert

bolson7117

Registered User.
Local time
Today, 15:56
Joined
Sep 1, 2009
Messages
42
Can anyone help with this, the field is combing MM/DD/YYYY (time) 12:00:00 AM exp. photo and I would like the date and or both to be Real date format. I'm not so worried about the time but the date would be nice.

here is what I have but im lost with the time added :banghead:

Field: Last Billable Read
Table: CornhuskerMetersEDE

Last Billable Read: DateSerial(IIf(Mid([CornhuskerMetersEDE].[Last Billable Read],1,2)>50,19,20) & Mid([CornhuskerMetersEDE].[Last Billable Read],1,2),Mid([CornhuskerMetersEDE].[Last Billable Read],3,2),Mid([CornhuskerMetersEDE].[Last Billable Read],5,2))
 

Attachments

  • Picture0001.jpg
    Picture0001.jpg
    13.1 KB · Views: 118
Isnt that column a date already??
Perhaps you are looking for: Format(yourfield, "MM/DD/YYYY 'time' HH:mm:ss")

Perhaps that is what you are looking for ???
 
Can anyone help with this, the field is combing MM/DD/YYYY (time) 12:00:00 AM exp. photo and I would like the date and or both to be Real date format. I'm not so worried about the time but the date would be nice.

here is what I have but im lost with the time added :banghead:

Field: Last Billable Read
Table: CornhuskerMetersEDE

Last Billable Read: DateSerial(IIf(Mid([CornhuskerMetersEDE].[Last Billable Read],1,2)>50,19,20) & Mid([CornhuskerMetersEDE].[Last Billable Read],1,2),Mid([CornhuskerMetersEDE].[Last Billable Read],3,2),Mid([CornhuskerMetersEDE].[Last Billable Read],5,2))

You're saying you want a Date instead of a DateTime? If so use
Code:
Format([Last Billable Read], "Short Date")

Side note - try to avoid spaces in your access object names.
 
Then you should be able to use a combo of Format and CDate to get it to a Short Date format...

Format(CDate([yourfield], "Short Date") ...something like that ought to work.
 

Users who are viewing this thread

Back
Top Bottom