|
| |
|
|
mmoore0319
Posts: 25 Joined: 10/17/2005 Status: offline
|
Date Format Help Needed - 4/25/2008 14:45:06
Hello, How can I take a general number field and convert it to date format mm/dd/yy? Example data that is pulled from csv file into database is 42108. The current command used, <%=FP_FieldVal(fp_rs,"InvoiceDate")%>, produces the same output but I want it in the above mentioned format. Using <%=FormatDateTime(FP_FieldVal(fp_rs,"InvoiceDate")%> converts the date into some odd date not even close to the original. Any help would be appreciated. Thanks!
|
|
|
|
rdouglass
Posts: 9137 From: Biddeford, ME USA Status: offline
|
RE: Date Format Help Needed - 4/25/2008 15:16:12
quote:
<%=FormatDateTime(FP_FieldVal(fp_rs,"InvoiceDate")%> Did you try this way: <%=FormatDateTime(FP_Field(fp_rs,"InvoiceDate"),VBShortDate)%> That any better?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
rdouglass
Posts: 9137 From: Biddeford, ME USA Status: offline
|
RE: Date Format Help Needed - 4/25/2008 15:17:45
quote:
Example data that is pulled from csv file into database is 42108 Ooops. Pulling fro a CSV, eh? Are you sure it's being recognized as a date and not a number? If it were being considered a number by the DRW, then yes it would be a very strange date.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
mmoore0319
Posts: 25 Joined: 10/17/2005 Status: offline
|
RE: Date Format Help Needed - 4/25/2008 15:22:36
I believe it is being recognized as a number and not a date. I have tried changing the Access column format from Number to Date/Time however, it also produces the same odd dates. I am not sure how I can correct the data in the Access database so was hoping for some insight into addressing the formatting from the webpage side of it. Of course, I would welcome a solution from the Access side as well.
|
|
|
|
mmoore0319
Posts: 25 Joined: 10/17/2005 Status: offline
|
RE: Date Format Help Needed - 4/25/2008 17:38:47
I'm not sure how I could do this since it is a csv file from a data dump out of AS400. What I am doing is taking the data and importing it into an Access table. At this point, I tried to format the column as a Date but this did not help since it converted it into meaningless dates. Yes, I understand your point. Is it possible to work backwards by taking 42008 and having the last two digits represent yy, the middle two as dd, and whatever is left over be mm? thanks,
|
|
|
|
rdouglass
Posts: 9137 From: Biddeford, ME USA Status: offline
|
RE: Date Format Help Needed - 4/28/2008 11:41:38
quote:
csv file from a data dump out of AS400. Just a thought. Do you have any influence on how that comes out? See, if you could get that to be formatted MMDDYYYY (or any other date-distinguishable format) when the export is done, then it's pretty straightforward. </$.02>
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|