change of seperator when using SaveAs, instead of 07/08/13 it needs to be 07.08.13
Good morning all,
I have a small programme running which requires the form to be saved after completion. It needs to be saved just by date and time, so using the following code
Code:
Application.Dialogs(xlDialogSaveAs). Show Now()
The only problem is that when the date and time are saved they have seperators which will not save ie. 07/08/13 09:01:30. I need to be able to change this to
07.08.13 09.01.30. Could somebody please show me how to do this.
Many thanks
Robbosan:confused:
Re: change of seperator when using SaveAs, instead of 07/08/13 it needs to be 07.08.1
This might work for you :
http://www.vb6.us/tutorials/formatin...-and-times-vb6
Although it is not separated with dots, but I think you'll get the idea
Re: change of seperator when using SaveAs, instead of 07/08/13 it needs to be 07.08.1
You may be able to use Replace() as well
Code:
Dim AlteredDate as String
AlteredDate=Replace(Now(), "/", ".")
Msgbox AlteredDate
The same can work for any character it this case you would need to use it more than once
Re: change of seperator when using SaveAs, instead of 07/08/13 it needs to be 07.08.1
Sorry for the delay in reply had to go away for afew days with work.
Many thanks for that it is a good reference point to begin with.
Best regards
Robbosan
Re: change of seperator when using SaveAs, instead of 07/08/13 it needs to be 07.08.1
Sorry for the delay in reply had to go away for a few days with work.
Many thanks for that it cetainly worked for my problem.
Best regards
Robbosan