Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default De-convert Dates

Hi,
I receive a list of passwords on CSV file that may get converted to a date format, which renders the passwords unusable. For example, one of the passwords may look like "Jun-02" and the content of the cell is "6/1/7502." However, the actual password is "june7502." My question is, how do I de-convert the date format (via VBA), so that the password is in the correct format?
James
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default De-convert Dates

hi James,

m = Month(Range("A1"))
y = Year(Range("A1"))
mmm = Array("january", "february", "march", "april", "may", "june", "july",
"august", "september", "october", "november", "december")
MsgBox mmm(m - 1) & y

isabelle

Le 2015-07-02 11:22, a écrit :
Hi,
I receive a list of passwords on CSV file that may get converted to a date format, which renders the passwords unusable.
For example, one of the passwords may look like "Jun-02" and the content of the cell is "6/1/7502."
However, the actual password is "june7502." My question is, how do I de-convert the date format (via VBA), so that the password is in the correct format?
James

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default De-convert Dates

On Thursday, July 2, 2015 at 12:01:38 PM UTC-5, isabelle wrote:
hi James,

m = Month(Range("A1"))
y = Year(Range("A1"))
mmm = Array("january", "february", "march", "april", "may", "june", "july",
"august", "september", "october", "november", "december")
MsgBox mmm(m - 1) & y

isabelle

Le 2015-07-02 11:22, a écrit :
Hi,
I receive a list of passwords on CSV file that may get converted to a date format, which renders the passwords unusable.
For example, one of the passwords may look like "Jun-02" and the content of the cell is "6/1/7502."
However, the actual password is "june7502." My question is, how do I de-convert the date format (via VBA), so that the password is in the correct format?
James


Thank you, Isabelle - that worked great!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default De-convert Dates - Again!

On Thursday, July 2, 2015 at 12:19:37 PM UTC-5, wrote:
On Thursday, July 2, 2015 at 12:01:38 PM UTC-5, isabelle wrote:
hi James,

m = Month(Range("A1"))
y = Year(Range("A1"))
mmm = Array("january", "february", "march", "april", "may", "june", "july",
"august", "september", "october", "november", "december")
MsgBox mmm(m - 1) & y

isabelle

Le 2015-07-02 11:22, a écrit :
Hi,
I receive a list of passwords on CSV file that may get converted to a date format, which renders the passwords unusable.
For example, one of the passwords may look like "Jun-02" and the content of the cell is "6/1/7502."
However, the actual password is "june7502." My question is, how do I de-convert the date format (via VBA), so that the password is in the correct format?
James


Thank you, Isabelle - that worked great!


I found that I have some Passwords that are showing up in serial date format for example 403776, but the true password is july3005. How can I convert the serial date to the month and last four digits?
James
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default De-convert Dates - Again!

hi James,

For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
m = Month(Format(Range("A" & i), "m/d/yyyy"))
y = Year(Format(Range("A" & i), "m/d/yyyy"))
mmm = Array("january", "february", "march", "april", "may", "june", "july",
"august", "september", "october", "november", "december")
MsgBox mmm(m - 1) & y
Next

isabelle

Le 2015-07-07 14:04, a écrit :

I found that I have some Passwords that are showing up in serial date format for example 403776,
but the true password is july3005. How can I convert the serial date to the month and last four digits?
James



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default De-convert Dates - Again!

On Tuesday, July 7, 2015 at 4:01:27 PM UTC-5, isabelle wrote:
hi James,

For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
m = Month(Format(Range("A" & i), "m/d/yyyy"))
y = Year(Format(Range("A" & i), "m/d/yyyy"))
mmm = Array("january", "february", "march", "april", "may", "june", "july",
"august", "september", "october", "november", "december")
MsgBox mmm(m - 1) & y
Next

isabelle

Le 2015-07-07 14:04, a écrit :

I found that I have some Passwords that are showing up in serial date format for example 403776,
but the true password is july3005. How can I convert the serial date to the month and last four digits?
James


Once again, Isabelle - it worked great!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I convert column of dates to Hebrew dates Joe Golden Excel Discussion (Misc queries) 11 May 14th 23 07:45 PM
Convert Amercan dates to English dates Karen Souter Excel Discussion (Misc queries) 2 December 21st 09 03:54 PM
How do I convert dates stored as dates to text? diamunds Excel Discussion (Misc queries) 5 September 7th 07 05:38 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
convert dates stored as text to dates lenko Excel Programming 2 December 5th 04 06:30 PM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"