#1
|
|||
|
|||
excel 2010 to format a date
In excel 2010, I am placing the following syntax in each row of the excel spreadsheet.
= "Update trans set c_date = 'DATEVALUE("&P1&")' where trans_ID = '"&D1&"'" I want to obtain the trans_id and c_date values from each applicable column. I am obtaining the trans_id value with no problem. However I am having a problem obtaining the C_date value in the format I need it to be. I would like the date to look like the following: 2013-01-29 17:04:00.207. This format is yyyy-mm-dd hh:mm:ss:000. The date can be in a short date format. I originally obtained the value in the C_date column from a sql server 2008 database. Thus can you tell me what I need to do obtain the C_date value in the format I need? |
#2
|
||||
|
||||
Hi Jassie,
Your second line is quite unclear. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab. FWIW, to coerce a number into a date/time string, you could use a formula like: =TEXT(A1,"YYYY-MM-DD hh:mm:ss")
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to create microsoft Excel 2007 and 2010 File in .xlsx format | ipacesetters | Excel | 1 | 12-16-2019 05:13 PM |
MS Query date format | remigio | Word | 3 | 08-21-2012 10:54 PM |
date format | gsrikanth | Excel | 1 | 12-28-2011 05:06 AM |
Mail merge will not format date field generated by Excel IF statement | borntorun75 | Mail Merge | 3 | 12-16-2011 06:28 AM |
Excel 2010 Format cells to use as Gantt or Plan | Kizzie | Excel | 0 | 12-13-2011 02:31 AM |